Issue 56 & 57 fix?

Issue 56 & 57 fix?
This commit is contained in:
cp6 2022-07-22 23:49:18 +10:00
parent 82f3b62761
commit 20058cb9c9
17 changed files with 41 additions and 1 deletions

View File

@ -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'];

View File

@ -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'];

View File

@ -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'];

View File

@ -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;

View File

@ -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)

View File

@ -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');

View File

@ -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 () {

View File

@ -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()

View File

@ -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'];

View File

@ -13,6 +13,8 @@ class OS extends Model
protected $fillable = ['name'];
protected $keyType = 'string';
protected $table = 'os';
public static function allOS(): array

View File

@ -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

View File

@ -13,6 +13,8 @@ class Providers extends Model
protected $fillable = ['name'];
protected $keyType = 'string';
protected $table = 'providers';
public static function allProviders(): array

View File

@ -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');

View File

@ -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'];

View File

@ -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',

View File

@ -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;

View File

@ -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'];