初始化
缺陷:主题配色需要优化整体的同风格
This commit is contained in:
24
app/Models/business/OrderItemModel.php
Normal file
24
app/Models/business/OrderItemModel.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user