Extract Ladill Servers as standalone app at servers.ladill.com.
VPS and dedicated server ordering, managed panels, SSO, billing, and launcher integration — forked from hosting infrastructure with server-focused routes and dashboard. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class ServerDatabase extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'customer_hosting_order_id',
|
||||
'server_agent_id',
|
||||
'latest_server_task_id',
|
||||
'server_site_id',
|
||||
'name',
|
||||
'username',
|
||||
'password_encrypted',
|
||||
'engine',
|
||||
'status',
|
||||
'metadata',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'metadata' => 'array',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'password_encrypted',
|
||||
];
|
||||
|
||||
public function order(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(CustomerHostingOrder::class, 'customer_hosting_order_id');
|
||||
}
|
||||
|
||||
public function agent(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(ServerAgent::class, 'server_agent_id');
|
||||
}
|
||||
|
||||
public function latestTask(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(ServerTask::class, 'latest_server_task_id');
|
||||
}
|
||||
|
||||
public function site(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(ServerSite::class, 'server_site_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user