Files
portal-api/app/Models/ServicePlan.php
T
baodev0andClaude Opus 5.5 30898ea46f feat: email gửi tay/nhắc gia hạn, gói hosting, sửa dữ liệu sản phẩm
- Gửi email theo template cho 1 khách, tab lịch sử email, nhắc gia hạn dịch vụ hàng loạt
- Mail lưu from/bcc/sent_by; mẫu MARKETING và mẫu cũ trong TemplateSeeder
- Gói hosting: giới hạn, trạng thái, lấy plan Plesk qua CLI gateway
- Backfill payment_method và ngày đơn hàng còn thiếu
- Bổ sung field CPU/RAM/Disk/Băng thông cho loại sản phẩm vps và cloud

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 11:32:05 +07:00

44 lines
819 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ServicePlan extends Model
{
protected $fillable = [
'title',
'description',
'vcpu',
'ram',
'disk',
'domain',
'bandwidth',
'databases',
'mailboxes',
'mailbox_quota',
'ftp_accounts',
'subdomains',
'domain_aliases',
'features',
'is_active',
'sort_order',
'dns_manager_server_id',
];
protected $casts = [
'features' => 'array',
'is_active' => 'boolean',
];
public function plesk()
{
return $this->hasOne(ServicePlanPlesk::class);
}
public function dnsServer()
{
return $this->belongsTo(DnsServer::class, 'dns_manager_server_id');
}
}