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,72 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class ServerAgent extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
public const STATUS_PENDING_REGISTRATION = 'pending_registration';
|
||||
public const STATUS_ONLINE = 'online';
|
||||
public const STATUS_OFFLINE = 'offline';
|
||||
|
||||
protected $fillable = [
|
||||
'customer_hosting_order_id',
|
||||
'uuid',
|
||||
'status',
|
||||
'hostname',
|
||||
'agent_version',
|
||||
'platform',
|
||||
'capabilities',
|
||||
'metadata',
|
||||
'bootstrap_token_hash',
|
||||
'access_token_hash',
|
||||
'access_token_issued_at',
|
||||
'registered_at',
|
||||
'last_heartbeat_at',
|
||||
'last_seen_ip',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'capabilities' => 'array',
|
||||
'metadata' => 'array',
|
||||
'access_token_issued_at' => 'datetime',
|
||||
'registered_at' => 'datetime',
|
||||
'last_heartbeat_at' => 'datetime',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'bootstrap_token_hash',
|
||||
'access_token_hash',
|
||||
];
|
||||
|
||||
public function order(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(CustomerHostingOrder::class, 'customer_hosting_order_id');
|
||||
}
|
||||
|
||||
public function tasks(): HasMany
|
||||
{
|
||||
return $this->hasMany(ServerTask::class);
|
||||
}
|
||||
|
||||
public function sites(): HasMany
|
||||
{
|
||||
return $this->hasMany(ServerSite::class);
|
||||
}
|
||||
|
||||
public function databases(): HasMany
|
||||
{
|
||||
return $this->hasMany(ServerDatabase::class);
|
||||
}
|
||||
|
||||
public function files(): HasMany
|
||||
{
|
||||
return $this->hasMany(ServerFile::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user