Initial Ladill Hosting app with Gitea deploy pipeline.
Deploy Ladill Hosting / deploy (push) Failing after 17s
Deploy Ladill Hosting / deploy (push) Failing after 17s
Shared web hosting extracted from the platform monolith, with CI deploy to /var/www/ladill-hosting matching Bird/Domains/Email. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class HostingAccountAlert extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
public const TYPE_WARNING = 'warning';
|
||||
public const TYPE_LIMIT_EXCEEDED = 'limit_exceeded';
|
||||
public const TYPE_THROTTLED = 'throttled';
|
||||
public const TYPE_SUSPENDED = 'suspended';
|
||||
|
||||
protected $fillable = [
|
||||
'hosting_account_id',
|
||||
'alert_type',
|
||||
'severity',
|
||||
'message',
|
||||
'resource_usage',
|
||||
'is_resolved',
|
||||
'resolved_at',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'resource_usage' => 'array',
|
||||
'is_resolved' => 'boolean',
|
||||
'resolved_at' => 'datetime',
|
||||
];
|
||||
|
||||
public function account(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(HostingAccount::class, 'hosting_account_id');
|
||||
}
|
||||
|
||||
public function scopeUnresolved($query)
|
||||
{
|
||||
return $query->where('is_resolved', false);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user