diff --git a/app/Models/DNS.php b/app/Models/DNS.php index 70f7b63..6cb1df2 100644 --- a/app/Models/DNS.php +++ b/app/Models/DNS.php @@ -13,6 +13,8 @@ class DNS extends Model public $incrementing = false; + protected $keyType = 'string'; + protected $fillable = ['id', 'service_id', 'hostname', 'dns_type', 'address', 'server_id', 'domain_id']; public static $dns_types = ['A', 'AAAA', 'DNAME', 'MX', 'NS', 'SOA', 'TXT', 'URI']; diff --git a/app/Models/DiskSpeed.php b/app/Models/DiskSpeed.php index 1094c5a..8d93e8a 100644 --- a/app/Models/DiskSpeed.php +++ b/app/Models/DiskSpeed.php @@ -11,6 +11,8 @@ class DiskSpeed extends Model public $incrementing = false; + protected $keyType = 'string'; + protected $table = 'disk_speed'; protected $fillable = ['id', 'server_id', 'd_4k', 'd_4k_type', 'd_4k_as_mbps', 'd_64k', 'd_64k_type', 'd_64k_as_mbps', 'd_512k', 'd_512k_type', 'd_512k_as_mbps', 'd_1m', 'd_1m_type', 'd_1m_as_mbps']; diff --git a/app/Models/Domains.php b/app/Models/Domains.php index 72001eb..64d76c1 100644 --- a/app/Models/Domains.php +++ b/app/Models/Domains.php @@ -15,6 +15,8 @@ class Domains extends Model protected $table = 'domains'; + protected $keyType = 'string'; + protected $fillable = ['id', 'domain', 'extension', 'ns1', 'ns2', 'ns3', 'price', 'currency', 'payment_term', 'owned_since', 'provider_id', 'next_due_date']; diff --git a/app/Models/IPs.php b/app/Models/IPs.php index 66e7053..cf14220 100644 --- a/app/Models/IPs.php +++ b/app/Models/IPs.php @@ -14,6 +14,8 @@ class IPs extends Model public $table = 'ips'; + protected $keyType = 'string'; + protected $fillable = ['id', 'active', 'service_id', 'address', 'is_ipv4']; public $incrementing = false; diff --git a/app/Models/Labels.php b/app/Models/Labels.php index 02fd417..0d8104a 100644 --- a/app/Models/Labels.php +++ b/app/Models/Labels.php @@ -15,6 +15,8 @@ class Labels extends Model protected $table = 'labels'; + protected $keyType = 'string'; + protected $fillable = ['id', 'label', 'server_id', 'server_id_2', 'domain_id', 'domain_id_2', 'shared_id', 'shared_id_2']; public static function deleteLabelsAssignedTo($service_id) diff --git a/app/Models/LabelsAssigned.php b/app/Models/LabelsAssigned.php index d1e4b1d..72d88d4 100644 --- a/app/Models/LabelsAssigned.php +++ b/app/Models/LabelsAssigned.php @@ -15,6 +15,8 @@ class LabelsAssigned extends Model protected $fillable = ['label_id', 'service_id']; + protected $keyType = 'string'; + public function label() { return $this->hasOne(Labels::class, 'id', 'label_id'); diff --git a/app/Models/Locations.php b/app/Models/Locations.php index 9956ebf..7f3b131 100644 --- a/app/Models/Locations.php +++ b/app/Models/Locations.php @@ -15,6 +15,8 @@ class Locations extends Model protected $table = 'locations'; + protected $keyType = 'string'; + public static function allLocations(): array { return Cache::remember("locations", now()->addMonth(1), function () { diff --git a/app/Models/Misc.php b/app/Models/Misc.php index 21115b0..bcd9459 100644 --- a/app/Models/Misc.php +++ b/app/Models/Misc.php @@ -14,6 +14,8 @@ class Misc extends Model protected $table = 'misc_services'; + protected $keyType = 'string'; + protected $fillable = ['id', 'name', 'owned_since']; public static function allMisc() diff --git a/app/Models/NetworkSpeed.php b/app/Models/NetworkSpeed.php index 9879517..565d13b 100644 --- a/app/Models/NetworkSpeed.php +++ b/app/Models/NetworkSpeed.php @@ -11,6 +11,8 @@ class NetworkSpeed extends Model public $incrementing = false; + protected $keyType = 'string'; + protected $table = 'network_speed'; protected $fillable = ['id', 'server_id', 'location', 'send', 'send_type', 'send_as_mbps', 'receive', 'receive_type', 'receive_as_mbps', 'created_at', 'updated_at']; diff --git a/app/Models/OS.php b/app/Models/OS.php index 9b2e7e5..506a80c 100644 --- a/app/Models/OS.php +++ b/app/Models/OS.php @@ -13,6 +13,8 @@ class OS extends Model protected $fillable = ['name']; + protected $keyType = 'string'; + protected $table = 'os'; public static function allOS(): array diff --git a/app/Models/Pricing.php b/app/Models/Pricing.php index 31f578c..58270b7 100644 --- a/app/Models/Pricing.php +++ b/app/Models/Pricing.php @@ -13,6 +13,12 @@ class Pricing extends Model { use HasFactory; + protected $table = 'pricings'; + + public $incrementing = false; + + protected $keyType = 'string'; + protected $fillable = ['service_id', 'service_type', 'currency', 'price', 'term', 'as_usd', 'usd_per_month', 'next_due_date']; private static function refreshRates(): object diff --git a/app/Models/Providers.php b/app/Models/Providers.php index e310f3a..00ee1d9 100644 --- a/app/Models/Providers.php +++ b/app/Models/Providers.php @@ -13,6 +13,8 @@ class Providers extends Model protected $fillable = ['name']; + protected $keyType = 'string'; + protected $table = 'providers'; public static function allProviders(): array diff --git a/app/Models/Reseller.php b/app/Models/Reseller.php index df43c73..ecb81c7 100644 --- a/app/Models/Reseller.php +++ b/app/Models/Reseller.php @@ -13,6 +13,8 @@ class Reseller extends Model protected $table = 'reseller_hosting'; + protected $keyType = 'string'; + protected $fillable = ['id', 'active', 'accounts', 'main_domain', 'has_dedicated_ip', 'ip', 'reseller_type', 'provider_id', 'location_id', 'bandwidth', 'disk', 'disk_type', 'disk_as_gb', 'domains_limit', 'subdomains_limit', 'ftp_limit', 'email_limit', 'db_limit', 'was_promo', 'owned_since']; public $incrementing = false; @@ -31,7 +33,7 @@ class Reseller extends Model ->with(['location', 'provider', 'price', 'ips', 'labels', 'labels.label'])->get(); }); } - + public function ips() { return $this->hasMany(IPs::class, 'service_id', 'id'); diff --git a/app/Models/SeedBoxes.php b/app/Models/SeedBoxes.php index 3b82126..9924c2d 100644 --- a/app/Models/SeedBoxes.php +++ b/app/Models/SeedBoxes.php @@ -13,6 +13,8 @@ class SeedBoxes extends Model protected $table = 'seedboxes'; + protected $keyType = 'string'; + public $incrementing = false; protected $fillable = ['id', 'active', 'title', 'hostname', 'seed_box_type', 'provider_id', 'location_id', 'bandwidth', 'port_speed', 'disk', 'disk_type', 'disk_as_gb', 'was_promo', 'owned_since']; diff --git a/app/Models/Server.php b/app/Models/Server.php index 4bfd330..683679c 100644 --- a/app/Models/Server.php +++ b/app/Models/Server.php @@ -12,6 +12,10 @@ class Server extends Model { use HasFactory; + protected $table = 'servers'; + + protected $keyType = 'string'; + public $incrementing = false; protected $fillable = ['id', 'hostname', 'ipv4', 'ipv6', 'server_type', 'os_id', 'location_id', 'provider_id', diff --git a/app/Models/Shared.php b/app/Models/Shared.php index 1cac7c1..b02ccb3 100644 --- a/app/Models/Shared.php +++ b/app/Models/Shared.php @@ -13,6 +13,8 @@ class Shared extends Model public $table = 'shared_hosting'; + protected $keyType = 'string'; + protected $fillable = ['id', 'active', 'main_domain', 'has_dedicated_ip', 'ip', 'shared_type', 'provider_id', 'location_id', 'bandwidth', 'disk', 'disk_type', 'disk_as_gb', 'domains_limit', 'subdomains_limit', 'ftp_limit', 'email_limit', 'db_limit', 'was_promo', 'owned_since']; public $incrementing = false; diff --git a/app/Models/Yabs.php b/app/Models/Yabs.php index 130a4ac..cb8c7d4 100644 --- a/app/Models/Yabs.php +++ b/app/Models/Yabs.php @@ -13,6 +13,8 @@ class Yabs extends Model public $incrementing = false; + protected $keyType = 'string'; + protected $table = 'yabs'; protected $fillable = ['id', 'server_id', 'has_ipv6', 'aes', 'vm', 'output_date', 'cpu_cores', 'cpu_freq', 'cpu_model', 'ram', 'ram_type', 'ram_mb', 'disk', 'disk_type', 'disk_gb', 'gb5_single', 'gb5_multi', 'gb5_id', '4k', '4k_type', '4k_as_mbps', '64k', '64k_type', '64k_as_mbps', '512k', '512k_type', '512k_as_mbps', '1m', '1m_type', '1m_as_mbps', 'location', 'send', 'send_type', 'send_as_mbps', 'receive', 'receive_type', 'receive_as_mbps', 'uptime', 'distro', 'kernel', 'swap', 'swap_type', 'swap_mb'];