'integer', 'order_id' => 'integer', 'order_item_id' => 'integer', 'product_id' => 'integer', 'price' => 'decimal:2', 'quantity' => 'decimal:2', 'weight' => 'decimal:3', 'amount' => 'decimal:2', 'is_reconciled' => 'integer', ]; /** * 所属对账单 */ public function statement(): BelongsTo { return $this->belongsTo(StatementModel::class, 'statement_id', 'id'); } /** * 来源订单 */ public function order(): BelongsTo { return $this->belongsTo(StoreOrderModel::class, 'order_id', 'id'); } /** * 来源订单明细 */ public function orderItem(): BelongsTo { return $this->belongsTo(StoreOrderItemModel::class, 'order_item_id', 'id'); } /** * 对账商品 */ public function product(): BelongsTo { return $this->belongsTo(ProductModel::class, 'product_id', 'id'); } }