goodsnotices/app/Models/Good.php
zhouchangcheng 6dddb19629 fix bug
2024-05-27 15:43:40 +08:00

22 lines
441 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Relations\HasOne;
/**
* @property GoodsItem $good_item
*/
class Good extends Base
{
public $fillable = [
'itemid','typeid','product_name','product_code','product_group',
'market_price','settlement','category_id', 'category_name'
];
public function item(): HasOne
{
return $this->hasOne(GoodsItem::class, 'item_id', 'itemid');
}
}