22 lines
436 B
PHP
22 lines
436 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Relations\HasOne;
|
|
|
|
/**
|
|
* @property GoodsItem $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');
|
|
}
|
|
}
|