goodsnotices/app/Models/Good.php
2024-05-24 19:04:29 +08:00

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');
}
}