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,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class HostedDatabase extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $fillable = [
|
||||
'hosting_account_id', 'hosted_site_id', 'name', 'username',
|
||||
'password_encrypted', 'type', 'size_bytes', 'status',
|
||||
];
|
||||
|
||||
protected $casts = ['size_bytes' => 'integer'];
|
||||
protected $hidden = ['password_encrypted'];
|
||||
|
||||
public function account(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(HostingAccount::class, 'hosting_account_id');
|
||||
}
|
||||
|
||||
public function site(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(HostedSite::class, 'hosted_site_id');
|
||||
}
|
||||
|
||||
public function getHostAttribute(): string
|
||||
{
|
||||
return 'localhost';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user