Files

39 lines
1.1 KiB
PHP
Raw Permalink Normal View History

<?php
namespace App\Models\business;
use App\BaseApp\BaseBusinessModel;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* 报价单cc_price_sheet
*
* 表里除 routine 外还有 6 个材质列(岩板、科技绒…),老项目 create() 从不给它们赋值、
* 前端表单列也全注释了,属于没启用的死 schema。新后端只读不写展示时按非空过滤
* 真要做多材质报价请走 cc_price_sheet_item 那套设计,不要继续往这些列上加逻辑。
*/
class PriceSheetModel extends BaseBusinessModel
{
protected $table = 'price_sheet';
protected $guarded = [];
/**
* 历史材质列,仅用于展示过滤
*/
public const MATERIAL_FIELDS = [
'routine',
'plank_of_rock',
'science_and_technology_velvet',
'imitation_leather',
'genuine_leather',
'science_and_technology_cloth',
'microfiber_skin',
];
public function catalogue(): BelongsTo
{
return $this->belongsTo(CatalogueModel::class, 'catalogue_id', 'id');
}
}