You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
612 B
32 lines
612 B
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Dcat\Admin\Traits\HasDateTimeFormatter;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class IndustryOrder extends BaseModel
|
|
{
|
|
use HasDateTimeFormatter;
|
|
use SoftDeletes;
|
|
|
|
public function supplier()
|
|
{
|
|
return $this->belongsTo(Supplier::class)->withTrashed();
|
|
}
|
|
|
|
public function agent()
|
|
{
|
|
return $this->belongsTo(Agent::class)->withTrashed();
|
|
}
|
|
|
|
public function industryProduct()
|
|
{
|
|
return $this->belongsTo(IndustryProduct::class);
|
|
}
|
|
|
|
public function spec()
|
|
{
|
|
return $this->hasOne(IndustryProductSpec::class, 'id', 'industry_product_spec_id');
|
|
}
|
|
}
|