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,126 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class Website extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'owner_user_id',
|
||||
'name',
|
||||
'slug',
|
||||
'subdomain',
|
||||
'status',
|
||||
'theme_tokens',
|
||||
'logo_path',
|
||||
'footer_logo_path',
|
||||
'favicon_path',
|
||||
'published_at',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'theme_tokens' => 'array',
|
||||
'published_at' => 'datetime',
|
||||
];
|
||||
|
||||
public function owner(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'owner_user_id');
|
||||
}
|
||||
|
||||
public function drafts(): HasMany
|
||||
{
|
||||
return $this->hasMany(WebsiteDraft::class);
|
||||
}
|
||||
|
||||
public function domains(): HasMany
|
||||
{
|
||||
return $this->hasMany(Domain::class);
|
||||
}
|
||||
|
||||
public function members(): HasMany
|
||||
{
|
||||
return $this->hasMany(WebsiteMember::class);
|
||||
}
|
||||
|
||||
public function subscriptions(): HasMany
|
||||
{
|
||||
return $this->hasMany(Subscription::class);
|
||||
}
|
||||
|
||||
public function leads(): HasMany
|
||||
{
|
||||
return $this->hasMany(Lead::class);
|
||||
}
|
||||
|
||||
public function mediaAssets(): HasMany
|
||||
{
|
||||
return $this->hasMany(MediaAsset::class);
|
||||
}
|
||||
|
||||
public function aiRequests(): HasMany
|
||||
{
|
||||
return $this->hasMany(AiRequest::class);
|
||||
}
|
||||
|
||||
public function publishes(): HasMany
|
||||
{
|
||||
return $this->hasMany(Publish::class);
|
||||
}
|
||||
|
||||
public function paymentSetting()
|
||||
{
|
||||
return $this->hasOne(WebsitePaymentSetting::class);
|
||||
}
|
||||
|
||||
public function wallet()
|
||||
{
|
||||
return $this->hasOne(WebsiteWallet::class);
|
||||
}
|
||||
|
||||
public function ecommerceProducts(): HasMany
|
||||
{
|
||||
return $this->hasMany(EcommerceProduct::class);
|
||||
}
|
||||
|
||||
public function ecommerceOrders(): HasMany
|
||||
{
|
||||
return $this->hasMany(EcommerceOrder::class);
|
||||
}
|
||||
|
||||
public function blogPosts(): HasMany
|
||||
{
|
||||
return $this->hasMany(BlogPost::class);
|
||||
}
|
||||
|
||||
public function blogCategories(): HasMany
|
||||
{
|
||||
return $this->hasMany(BlogCategory::class);
|
||||
}
|
||||
|
||||
public function contactMessages(): HasMany
|
||||
{
|
||||
return $this->hasMany(ContactMessage::class);
|
||||
}
|
||||
|
||||
public function newsletterSubscribers(): HasMany
|
||||
{
|
||||
return $this->hasMany(NewsletterSubscriber::class);
|
||||
}
|
||||
|
||||
public function newsletterCampaigns(): HasMany
|
||||
{
|
||||
return $this->hasMany(NewsletterCampaign::class);
|
||||
}
|
||||
|
||||
public function mailboxes(): HasMany
|
||||
{
|
||||
return $this->hasMany(Mailbox::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user