Files
ladill-hosting/app/Models/HostingAccountAlert.php
isaaccladandCursor e251a4cf60
Deploy Ladill Hosting / deploy (push) Failing after 17s
Initial Ladill Hosting app with Gitea deploy pipeline.
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>
2026-06-06 16:24:20 +00:00

44 lines
1022 B
PHP

<?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);
}
}