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

22 lines
521 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasOne;
/**
* @property GoodItem $goodItem
*/
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(GoodItem::class,'item_id');
}
}