Deploy Ladill Hosting / deploy (push) Failing after 17s
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>
94 lines
2.8 KiB
PHP
94 lines
2.8 KiB
PHP
<?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]);
|
|
}
|
|
}
|