'decimal:2', 'line_total_amount' => 'decimal:2', 'snapshot' => 'array', ]; public function merchant(): BelongsTo { return $this->belongsTo(Merchant::class, 'merchant_id'); } public function order(): BelongsTo { return $this->belongsTo(Order::class); } public function product(): BelongsTo { return $this->belongsTo(Product::class); } public function scopeForMerchant(Builder $query, int $merchantId): Builder { return $query->where('merchant_id', $merchantId); } }