Skip to content

Commit

Permalink
Changes to files: Entities/BillingCycle.php
Browse files Browse the repository at this point in the history
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
  • Loading branch information
dedanirungu committed Aug 15, 2023
1 parent ca3825a commit eca66b6
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Entities/BillingCycle.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 2 additions & 0 deletions Entities/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
1 change: 1 addition & 0 deletions Entities/MacAddress.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down
2 changes: 2 additions & 0 deletions Entities/Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 2 additions & 0 deletions Entities/PackageCharge.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 2 additions & 0 deletions Entities/PackageChargeRate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down
2 changes: 2 additions & 0 deletions Entities/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down
2 changes: 2 additions & 0 deletions Entities/PaymentCharge.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 2 additions & 0 deletions Entities/PaymentChargeRate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down
2 changes: 2 additions & 0 deletions Entities/Subscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
1 change: 1 addition & 0 deletions Entities/SubscriberLogin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 2 additions & 0 deletions Entities/Subscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down

0 comments on commit eca66b6

Please sign in to comment.