20 lines
371 B
PHP
20 lines
371 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 Model
|
|
{
|
|
use HasFactory;
|
|
|
|
public function GoodItem() :HasOne {
|
|
return $this->hasOne(GoodItem::class,'item_id');
|
|
}
|
|
}
|