*/ use HasFactory; /** * @return HasMany */ public function lines(): HasMany { return $this->hasMany(QuickSaleLineModel::class, 'quick_sale_id')->orderBy('sort_order'); } /** * @return HasOne */ public function credit(): HasOne { return $this->hasOne(QuickSaleModel::class, 'credits_quick_sale_id'); } /** * @return array */ protected function casts(): array { return [ 'user_id' => 'integer', 'customer_id' => 'integer', 'payment_method' => PaymentMethod::class, 'sold_at' => 'datetime', 'total_cents' => 'integer', 'credits_quick_sale_id' => 'integer', 'receipt_email' => 'encrypted', 'receipt_sent_at' => 'datetime', 'receipt_send_failed_at' => 'datetime', ]; } }