Files
ladill-hosting/app/Models/HostedDatabase.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

36 lines
839 B
PHP

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