From eca66b64f5d3169117cda9999c85ff8b29240112 Mon Sep 17 00:00:00 2001 From: Dedan Irungu Date: Tue, 15 Aug 2023 10:24:07 +0300 Subject: [PATCH] Changes to files: Entities/BillingCycle.php Entities/Gateway.php Entities/MacAddress.php Entities/Package.php Entities/PackageCharge.php Entities/PackageChargeRate.php Entities/Payment.php Entities/PaymentCharge.php Entities/PaymentChargeRate.php Entities/Subscriber.php Entities/SubscriberLogin.php Entities/Subscription.php --- Entities/BillingCycle.php | 2 ++ Entities/Gateway.php | 2 ++ Entities/MacAddress.php | 1 + Entities/Package.php | 2 ++ Entities/PackageCharge.php | 2 ++ Entities/PackageChargeRate.php | 2 ++ Entities/Payment.php | 2 ++ Entities/PaymentCharge.php | 2 ++ Entities/PaymentChargeRate.php | 2 ++ Entities/Subscriber.php | 2 ++ Entities/SubscriberLogin.php | 1 + Entities/Subscription.php | 2 ++ 12 files changed, 22 insertions(+) diff --git a/Entities/BillingCycle.php b/Entities/BillingCycle.php index c447d33..3de7fa6 100755 --- a/Entities/BillingCycle.php +++ b/Entities/BillingCycle.php @@ -43,6 +43,8 @@ class BillingCycle extends BaseModel */ public function fields(Blueprint $table): void { + $this->fields = $table ?? new Blueprint($this->table); + $this->fields->increments('id')->html('text'); $this->fields->string('title')->html('text'); $this->fields->string('slug')->html('text'); diff --git a/Entities/Gateway.php b/Entities/Gateway.php index e3ff8f6..9b5ef22 100755 --- a/Entities/Gateway.php +++ b/Entities/Gateway.php @@ -43,6 +43,8 @@ class Gateway extends BaseModel */ public function fields(Blueprint $table): void { + $this->fields = $table ?? new Blueprint($this->table); + $this->fields->increments('id')->html('text'); $this->fields->string('title')->html('text'); $this->fields->string('username')->html('text'); diff --git a/Entities/MacAddress.php b/Entities/MacAddress.php index 558568d..cc8a33b 100755 --- a/Entities/MacAddress.php +++ b/Entities/MacAddress.php @@ -44,6 +44,7 @@ class MacAddress extends BaseModel */ public function fields(Blueprint $table): void { + $this->fields = $table ?? new Blueprint($this->table); $this->fields->increments('id')->html('text'); $this->fields->foreignId('subscriber_id')->nullable()->html('recordpicker')->table(['isp', 'subscriber']); diff --git a/Entities/Package.php b/Entities/Package.php index 479f590..0608de1 100755 --- a/Entities/Package.php +++ b/Entities/Package.php @@ -48,6 +48,8 @@ class Package extends BaseModel */ public function fields(Blueprint $table): void { + $this->fields = $table ?? new Blueprint($this->table); + $this->fields->increments('id')->html('text'); $this->fields->string('title')->html('text'); $this->fields->string('slug')->html('text'); diff --git a/Entities/PackageCharge.php b/Entities/PackageCharge.php index 93e54a3..73bac12 100755 --- a/Entities/PackageCharge.php +++ b/Entities/PackageCharge.php @@ -44,6 +44,8 @@ class PackageCharge extends BaseModel */ public function fields(Blueprint $table): void { + $this->fields = $table ?? new Blueprint($this->table); + $this->fields->increments('id')->html('text'); $this->fields->string('title')->html('text'); $this->fields->string('slug')->html('text'); diff --git a/Entities/PackageChargeRate.php b/Entities/PackageChargeRate.php index 7f4762b..213099c 100755 --- a/Entities/PackageChargeRate.php +++ b/Entities/PackageChargeRate.php @@ -44,6 +44,8 @@ class PackageChargeRate extends BaseModel */ public function fields(Blueprint $table): void { + $this->fields = $table ?? new Blueprint($this->table); + $this->fields->increments('id')->html('text'); $this->fields->foreignId('package_charge_id')->html('recordpicker')->table(['isp', 'package_charge']); $this->fields->foreignId('rate_id')->html('recordpicker')->table(['account', 'rate']); diff --git a/Entities/Payment.php b/Entities/Payment.php index 2879103..f67f449 100755 --- a/Entities/Payment.php +++ b/Entities/Payment.php @@ -46,6 +46,8 @@ class Payment extends BaseModel */ public function fields(Blueprint $table): void { + $this->fields = $table ?? new Blueprint($this->table); + $this->fields->increments('id')->html('text'); $this->fields->string('title')->html('text'); $this->fields->foreignId('subscription_id')->nullable()->html('recordpicker')->table(['isp', 'subscription']); diff --git a/Entities/PaymentCharge.php b/Entities/PaymentCharge.php index d3550e0..bea04f7 100755 --- a/Entities/PaymentCharge.php +++ b/Entities/PaymentCharge.php @@ -44,6 +44,8 @@ class PaymentCharge extends BaseModel */ public function fields(Blueprint $table): void { + $this->fields = $table ?? new Blueprint($this->table); + $this->fields->increments('id')->html('text'); $this->fields->string('title')->html('text'); $this->fields->string('slug')->html('text'); diff --git a/Entities/PaymentChargeRate.php b/Entities/PaymentChargeRate.php index ca8528b..61fee00 100755 --- a/Entities/PaymentChargeRate.php +++ b/Entities/PaymentChargeRate.php @@ -44,6 +44,8 @@ class PaymentChargeRate extends BaseModel */ public function fields(Blueprint $table): void { + $this->fields = $table ?? new Blueprint($this->table); + $this->fields->increments('id'); $this->fields->foreignId('payment_charge_id')->html('recordpicker')->table(['isp', 'payment_charge']); $this->fields->foreignId('rate_id')->html('recordpicker')->table(['account', 'rate']); diff --git a/Entities/Subscriber.php b/Entities/Subscriber.php index 5697f8f..3c1b18b 100755 --- a/Entities/Subscriber.php +++ b/Entities/Subscriber.php @@ -44,6 +44,8 @@ class Subscriber extends BaseModel */ public function fields(Blueprint $table): void { + $this->fields = $table ?? new Blueprint($this->table); + $this->fields->increments('id')->html('text'); $this->fields->string('username')->unique()->html('text'); $this->fields->string('password')->html('text'); diff --git a/Entities/SubscriberLogin.php b/Entities/SubscriberLogin.php index 0a5ed07..7258d25 100755 --- a/Entities/SubscriberLogin.php +++ b/Entities/SubscriberLogin.php @@ -44,6 +44,7 @@ class SubscriberLogin extends BaseModel */ public function fields(Blueprint $table): void { + $this->fields = $table ?? new Blueprint($this->table); $this->fields->increments('id')->html('text'); $this->fields->string('mac')->nullable()->html('text'); diff --git a/Entities/Subscription.php b/Entities/Subscription.php index fe7d764..2e50226 100755 --- a/Entities/Subscription.php +++ b/Entities/Subscription.php @@ -46,6 +46,8 @@ class Subscription extends BaseModel */ public function fields(Blueprint $table): void { + $this->fields = $table ?? new Blueprint($this->table); + $this->fields->increments('id')->html('text'); $this->fields->foreignId('subscriber_id')->html('recordpicker')->table(['isp', 'subscriber']); $this->fields->foreignId('package_id')->html('recordpicker')->table(['isp', 'package']);