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:
isaacclad
2026-06-06 19:18:30 +00:00
co-authored by Cursor
commit b6c8ac343f
382 changed files with 67315 additions and 0 deletions
+62
View File
@@ -0,0 +1,62 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class HostingBillingInvoice extends Model
{
use HasFactory;
public const TYPE_PLAN_CHANGE = 'plan_change';
public const TYPE_EMAIL_ADDON = 'email_addon';
public const TYPE_RENEWAL = 'renewal';
public const STATUS_PENDING = 'pending';
public const STATUS_PAID = 'paid';
public const STATUS_CREDITED = 'credited';
public const STATUS_WAIVED = 'waived';
protected $fillable = [
'user_id',
'hosting_account_id',
'hosting_plan_change_id',
'invoice_type',
'status',
'currency',
'subtotal_amount',
'credit_amount',
'total_amount',
'description',
'provider_reference',
'paid_at',
'line_items',
'metadata',
];
protected $casts = [
'subtotal_amount' => 'decimal:2',
'credit_amount' => 'decimal:2',
'total_amount' => 'decimal:2',
'paid_at' => 'datetime',
'line_items' => 'array',
'metadata' => 'array',
];
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
public function account(): BelongsTo
{
return $this->belongsTo(HostingAccount::class, 'hosting_account_id');
}
public function planChange(): BelongsTo
{
return $this->belongsTo(HostingPlanChange::class, 'hosting_plan_change_id');
}
}