goodsnotices/app/Models/Good.php
2024-05-26 22:06:21 +08:00

22 lines
445 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 goodItem(): HasOne
{
return $this->hasOne(GoodsItem::class, 'item_id', 'itemid');
}
}