2024-05-24 07:55:55 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
2024-05-24 11:04:29 +00:00
|
|
|
use Illuminate\Database\Eloquent\Relations\HasOne;
|
2024-05-24 07:55:55 +00:00
|
|
|
|
2024-05-24 11:04:29 +00:00
|
|
|
/**
|
|
|
|
* @property GoodItem $goodItem
|
|
|
|
*/
|
2024-05-25 14:06:58 +00:00
|
|
|
class Good extends Base
|
2024-05-24 07:55:55 +00:00
|
|
|
{
|
2024-05-25 14:06:58 +00:00
|
|
|
public $fillable = [
|
|
|
|
'itemid','typeid','product_name','product_code','product_group',
|
|
|
|
'market_price','settlement','category_id', 'category_name'
|
|
|
|
];
|
2024-05-24 11:04:29 +00:00
|
|
|
public function GoodItem() :HasOne {
|
|
|
|
return $this->hasOne(GoodItem::class,'item_id');
|
|
|
|
}
|
2024-05-24 07:55:55 +00:00
|
|
|
}
|