22 lines
521 B
PHP
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');
|
|
}
|
|
}
|