Files
lgp-admin-plus-api/app/Models/business/OrderItemModel.php
LQ bcf54c2727 初始化
缺陷:主题配色需要优化整体的同风格
2026-08-14 23:21:21 +08:00

25 lines
613 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace App\Models\business;
use App\BaseApp\BaseBusinessModel;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* 订单明细cc_order_item
*
* 标题、封面、规格、单价全部是下单那一刻的快照。catalogue_id 只用于溯源,
* 展示金额与规格时不要回查商品表,否则后台改价会改掉历史订单。
*/
class OrderItemModel extends BaseBusinessModel
{
protected $table = 'order_item';
protected $guarded = [];
public function order(): BelongsTo
{
return $this->belongsTo(OrderModel::class, 'order_id', 'id');
}
}