增加关联关系

This commit is contained in:
mzl
2025-09-04 11:52:40 +08:00
parent 87679588b4
commit ced046aa18
11 changed files with 140 additions and 660 deletions
+9
View File
@@ -46,4 +46,13 @@ class StockOrderAccounts extends Model
* 不允许自动填充模型字段
*/
protected $guarded = [];
/**
* 关联主订单
*/
public function order()
{
return $this->belongsTo(StockOrders::class, 'order_id', 'id');
}
}