'int', 'host_id' => 'int', 'user_id' => 'int', 'order_id' => 'int', 'plan_id' => 'int', 'offer_id' => 'int', 'resource_pool_id' => 'int', 'reservation_id' => 'int', 'current_period_id' => 'int', 'expires_at' => 'int', 'renewal_price' => 'decimal:2', 'renewal_days' => 'int', 'renewal_traffic_bytes' => 'int', 'traffic_quota_bytes' => 'int', 'created_at' => 'int', 'updated_at' => 'int', ]; protected $hidden = ['credential_cipher']; public function serviceAvailable(?int $now = null): bool { if ((string) $this->service_status === 'exempt') { return true; } $now ??= time(); return (string) $this->service_status === 'active' && $this->expires_at !== null && (int) $this->expires_at > $now; } }