25 lines
613 B
PHP
25 lines
613 B
PHP
|
|
<?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');
|
|||
|
|
}
|
|||
|
|
}
|