feat: add GeneratesUniqueSlug class for unique slug generation
feat: create PostCategoryFactory for generating post category data feat: create PostFactory for generating post data feat: add retry_requested_at column to services table feat: add vcenter provisioning fields to products table feat: add module_host_id to os table feat: create email_notification_templates table for email templates feat: add scenario and format fields to template table feat: add admin fields to transactions table fix: update ticket table columns and types feat: add uuid to ticket table and backfill existing records fix: make ticket_reply user_id nullable feat: create notifications table for user notifications fix: make ticket uuid nullable feat: create post_categories table for blog categories feat: create posts table for blog posts feat: add invoice email template for PDF generation
This commit is contained in:
@@ -28,6 +28,7 @@ class Service extends Model
|
||||
'expires_at' => 'datetime',
|
||||
'suspended_at' => 'datetime',
|
||||
'cancelled_at' => 'datetime',
|
||||
'retry_requested_at' => 'datetime',
|
||||
];
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
@@ -77,6 +78,21 @@ class Service extends Model
|
||||
return $this->status === 'active';
|
||||
}
|
||||
|
||||
public function isPending(): bool
|
||||
{
|
||||
return $this->status === 'pending';
|
||||
}
|
||||
|
||||
public function canRetryProvisioning(): bool
|
||||
{
|
||||
return $this->isPending() && $this->retry_requested_at === null;
|
||||
}
|
||||
|
||||
public function retryRequested(): bool
|
||||
{
|
||||
return $this->retry_requested_at !== null;
|
||||
}
|
||||
|
||||
public function isExpired(): bool
|
||||
{
|
||||
return $this->expires_at !== null && $this->expires_at->isPast();
|
||||
|
||||
Reference in New Issue
Block a user