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>
127 lines
2.6 KiB
PHP
127 lines
2.6 KiB
PHP
<?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);
|
|
}
|
|
}
|