Skip to content

Commit

Permalink
Issue 56 & 57 fix?
Browse files Browse the repository at this point in the history
Issue 56 & 57 fix?
  • Loading branch information
cp6 committed Jul 22, 2022
1 parent 82f3b62 commit 20058cb
Show file tree
Hide file tree
Showing 17 changed files with 41 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/Models/DNS.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand Down
2 changes: 2 additions & 0 deletions app/Models/DiskSpeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand Down
2 changes: 2 additions & 0 deletions app/Models/Domains.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];


Expand Down
2 changes: 2 additions & 0 deletions app/Models/IPs.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions app/Models/Labels.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions app/Models/LabelsAssigned.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 2 additions & 0 deletions app/Models/Locations.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down
2 changes: 2 additions & 0 deletions app/Models/Misc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 2 additions & 0 deletions app/Models/NetworkSpeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand Down
2 changes: 2 additions & 0 deletions app/Models/OS.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class OS extends Model

protected $fillable = ['name'];

protected $keyType = 'string';

protected $table = 'os';

public static function allOS(): array
Expand Down
6 changes: 6 additions & 0 deletions app/Models/Pricing.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions app/Models/Providers.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class Providers extends Model

protected $fillable = ['name'];

protected $keyType = 'string';

protected $table = 'providers';

public static function allProviders(): array
Expand Down
4 changes: 3 additions & 1 deletion app/Models/Reseller.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -31,7 +33,7 @@ public static function resellerHosting(string $shared_id)
->with(['location', 'provider', 'price', 'ips', 'labels', 'labels.label'])->get();
});
}

public function ips()
{
return $this->hasMany(IPs::class, 'service_id', 'id');
Expand Down
2 changes: 2 additions & 0 deletions app/Models/SeedBoxes.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand Down
4 changes: 4 additions & 0 deletions app/Models/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 2 additions & 0 deletions app/Models/Shared.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions app/Models/Yabs.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand Down

0 comments on commit 20058cb

Please sign in to comment.