35 lines
863 B
PHP
35 lines
863 B
PHP
|
|
<?php
|
|||
|
|
|
|||
|
|
namespace App\Models\business;
|
|||
|
|
|
|||
|
|
use App\BaseApp\BaseBusinessModel;
|
|||
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* 清单明细(cc_list_item)
|
|||
|
|
*
|
|||
|
|
* catalogue_id 指向商品图册;price_sheet_id 指向具体规格行,
|
|||
|
|
* 老库没有这个字段,所以历史数据这里是 0,转订单时要提示用户补选规格。
|
|||
|
|
*/
|
|||
|
|
class ListItemModel extends BaseBusinessModel
|
|||
|
|
{
|
|||
|
|
protected $table = 'list_item';
|
|||
|
|
|
|||
|
|
protected $guarded = [];
|
|||
|
|
|
|||
|
|
public function catalogue(): BelongsTo
|
|||
|
|
{
|
|||
|
|
return $this->belongsTo(CatalogueModel::class, 'catalogue_id', 'id');
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public function priceSheet(): BelongsTo
|
|||
|
|
{
|
|||
|
|
return $this->belongsTo(PriceSheetModel::class, 'price_sheet_id', 'id');
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public function list(): BelongsTo
|
|||
|
|
{
|
|||
|
|
return $this->belongsTo(ListModel::class, 'list_id', 'id');
|
|||
|
|
}
|
|||
|
|
}
|