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
+93
View File
@@ -0,0 +1,93 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class RcServiceOrder extends Model
{
use HasFactory;
public const TYPE_SERVICE = 'service';
public const TYPE_DOMAIN_REGISTRATION = 'domain_registration';
public const TYPE_DOMAIN_TRANSFER = 'domain_transfer';
public const TYPE_RENEWAL = 'renewal';
public const STATUS_CART = 'cart';
public const STATUS_PENDING_PAYMENT = 'pending_payment';
public const STATUS_PENDING = 'pending';
public const STATUS_PROCESSING = 'processing';
public const STATUS_ACTIVE = 'active';
public const STATUS_SUSPENDED = 'suspended';
public const STATUS_CANCELLED = 'cancelled';
public const STATUS_EXPIRED = 'expired';
public const STATUS_FAILED = 'failed';
public const PAYMENT_STATUS_UNPAID = 'unpaid';
public const PAYMENT_STATUS_PENDING = 'pending';
public const PAYMENT_STATUS_PAID = 'paid';
public const PAYMENT_STATUS_FAILED = 'failed';
public const PAYMENT_STATUS_REFUNDED = 'refunded';
public const FULFILLMENT_CART = 'cart';
public const FULFILLMENT_PAYMENT_PENDING = 'payment_pending';
public const FULFILLMENT_PAYMENT_RECEIVED = 'payment_received';
public const FULFILLMENT_SUBMITTING = 'submitting';
public const FULFILLMENT_AWAITING_VENDOR = 'awaiting_vendor';
public const FULFILLMENT_MANUAL_REVIEW = 'manual_review';
public const FULFILLMENT_FULFILLED = 'fulfilled';
public const FULFILLMENT_FAILED = 'failed';
protected $fillable = [
'user_id',
'category',
'order_type',
'domain_name',
'rc_order_id',
'rc_customer_id',
'plan_id',
'plan_name',
'status',
'payment_status',
'fulfillment_status',
'payment_reference',
'amount_minor',
'currency',
'term_months',
'term_years',
'server_location',
'ip_address',
'access_url',
'access_username',
'expires_at',
'paid_at',
'submitted_at',
'last_synced_at',
'provisioned_at',
'meta',
];
protected $casts = [
'amount_minor' => 'integer',
'term_months' => 'integer',
'term_years' => 'integer',
'expires_at' => 'datetime',
'paid_at' => 'datetime',
'submitted_at' => 'datetime',
'last_synced_at' => 'datetime',
'provisioned_at' => 'datetime',
'meta' => 'array',
];
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
public function scopeVisibleToCustomer($query)
{
return $query->whereNotIn('status', [self::STATUS_CART, self::STATUS_PENDING_PAYMENT]);
}
}