Skip to content

Commit

Permalink
Changes to files: database/migrations/2024_08_02_081858_create_isp_bi…
Browse files Browse the repository at this point in the history
…lling_cycle_table.php

database/migrations/2024_08_02_081908_create_isp_gateway_table.php
database/migrations/2024_08_02_082115_create_isp_subscriber_login_table.php
database/migrations/2024_08_03_082005_create_isp_package_table.php
database/migrations/2024_08_03_082019_create_isp_package_charge_table.php
database/migrations/2024_08_03_082020_create_isp_package_charge_rate_table.php
database/migrations/2024_08_03_082024_create_isp_subscriber_table.php
database/migrations/2024_08_03_082025_create_isp_mac_address_table.php
database/migrations/2024_08_03_082026_create_isp_subscription_table.php
database/migrations/2024_08_03_082037_create_isp_payment_table.php
database/migrations/2024_08_03_082044_create_isp_payment_charge_table.php
database/migrations/2024_08_03_082050_create_isp_payment_charge_rate_table.php
database/migrations/2024_09_03_133219_add_deleted_at_to_isp_billing_cycle_table.php
database/migrations/2024_09_03_133228_add_deleted_at_to_isp_gateway_table.php
database/migrations/2024_09_03_133240_add_deleted_at_to_isp_mac_address_table.php
database/migrations/2024_09_03_133251_add_deleted_at_to_isp_package_table.php
database/migrations/2024_09_03_133257_add_deleted_at_to_isp_package_charge_table.php
database/migrations/2024_09_03_133311_add_deleted_at_to_isp_package_charge_rate_table.php
database/migrations/2024_09_03_133321_add_deleted_at_to_isp_payment_table.php
database/migrations/2024_09_03_133340_add_deleted_at_to_isp_payment_charge_table.php
database/migrations/2024_09_03_133348_add_deleted_at_to_isp_payment_charge_rate_table.php
database/migrations/2024_09_03_133406_add_deleted_at_to_isp_subscriber_table.php
database/migrations/2024_09_03_133413_add_deleted_at_to_isp_subscriber_login_table.php
database/migrations/2024_09_03_133420_add_deleted_at_to_isp_subscription_table.php
  • Loading branch information
dedanirungu committed Sep 27, 2024
1 parent 4357ad5 commit 6176637
Show file tree
Hide file tree
Showing 24 changed files with 76 additions and 355 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ public function up(): void
$table->string('slug');
$table->string('description')->nullable();
$table->string('duration')->nullable();
$table->enum('duration_type', ['day', 'week', 'month', 'year'])->default('month')->nullable();
$table->enum('duration_type', ['minute', 'hour', 'day', 'week', 'month', 'year'])->default('day')->nullable();
$table->boolean('published')->default(true)->nullable();

$table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('updated_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('deleted_by')->nullable()->constrained('users')->onDelete('set null');



$table->timestamps();
$table->softDeletes();
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ public function up(): void
$table->string('type');
$table->boolean('published')->nullable()->default(true);

$table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('updated_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('deleted_by')->nullable()->constrained('users')->onDelete('set null');

$table->timestamps();
$table->softDeletes();
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ public function up(): void
$table->string('link_orig_esc')->nullable();
$table->string('mac_esc')->nullable();

$table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('updated_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('deleted_by')->nullable()->constrained('users')->onDelete('set null');

$table->timestamps();
$table->softDeletes();
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ public function up(): void
$table->string('slug');
$table->string('pool');
$table->string('description')->nullable();
$table->foreignId('billing_cycle_id')->constrained('isp_billing_cycle')->onDelete('cascade')->nullable()->index('isp_package_billing_cycle_id');
$table->foreignId('gateway_id')->constrained('isp_gateway')->onDelete('cascade')->nullable()->index('isp_package_gateway_id');
$table->foreignId('billing_cycle_id')->nullable()->constrained('isp_billing_cycle')->onDelete('set null');
$table->foreignId('gateway_id')->nullable()->constrained('isp_gateway')->onDelete('set null');
$table->string('speed')->nullable();
$table->enum('speed_type', ['gigabyte', 'kilobyte', 'megabyte'])->default('megabyte')->nullable();
$table->string('bundle')->nullable();
Expand All @@ -32,7 +32,12 @@ public function up(): void
$table->boolean('is_hidden')->default(false)->nullable();
$table->decimal('amount', 8, 2)->nullable();

$table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('updated_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('deleted_by')->nullable()->constrained('users')->onDelete('set null');

$table->timestamps();
$table->softDeletes();
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,19 @@ public function up(): void

$table->string('title');
$table->string('slug');
$table->foreignId('package_id')->constrained('isp_package')->onDelete('cascade')->index('isp_package_charge_package_id');
$table->foreignId('ledger_id')->constrained('account_ledger')->onDelete('cascade')->index('isp_package_charge_ledger_id');
$table->foreignId('package_id')->nullable()->constrained('isp_package')->onDelete('set null');
$table->foreignId('ledger_id')->nullable()->constrained('account_ledger')->onDelete('set null');
$table->tinyInteger('quantity')->default(1);
$table->string('description')->nullable();
$table->double('price', 8, 2)->nullable();
$table->boolean('published')->default(true)->nullable();

$table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('updated_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('deleted_by')->nullable()->constrained('users')->onDelete('set null');

$table->timestamps();
$table->softDeletes();
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@ public function up(): void
Schema::create('isp_package_charge_rate', function (Blueprint $table) {
$table->id();

$table->foreignId('package_charge_id')->constrained('isp_package_charge')->onDelete('cascade')->index('isp_package_charge_rate_payment_charge_id');
$table->foreignId('rate_id')->constrained('account_rate')->onDelete('cascade')->index('isp_package_charge_rate_rate_id');
$table->foreignId('package_charge_id')->nullable()->constrained('isp_package_charge')->onDelete('set null');
$table->foreignId('rate_id')->nullable()->constrained('account_rate')->onDelete('set null');
$table->boolean('published')->default(true)->nullable();

$table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('updated_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('deleted_by')->nullable()->constrained('users')->onDelete('set null');

$table->timestamps();
$table->softDeletes();
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@ public function up(): void
$table->string('username');
$table->string('password');
$table->boolean('had_trail')->default(0)->nullable();
$table->foreignId('partner_id')->constrained('partner_partner')->onDelete('cascade')->nullable()->index('isp_subscriber_partner_id');
$table->foreignId('partner_id')->nullable()->constrained('partner_partner')->onDelete('set null');

$table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('updated_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('deleted_by')->nullable()->constrained('users')->onDelete('set null');

$table->timestamps();
$table->softDeletes();
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@ public function up(): void
Schema::create('isp_mac_address', function (Blueprint $table) {
$table->id();

$table->foreignId('subscriber_id')->constrained('isp_subscriber')->onDelete('cascade')->nullable()->index('isp_mac_address_subscriber_id');
$table->foreignId('subscriber_id')->nullable()->constrained('isp_subscriber')->onDelete('set null');
$table->string('mac')->nullable();

$table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('updated_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('deleted_by')->nullable()->constrained('users')->onDelete('set null');

$table->timestamps();
$table->softDeletes();
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,17 @@ public function up(): void
Schema::create('isp_subscription', function (Blueprint $table) {
$table->id();

$table->foreignId('subscriber_id')->constrained('isp_subscriber')->onDelete('cascade')->index('isp_subscription_subscriber_id');
$table->foreignId('package_id')->constrained('isp_package')->onDelete('cascade')->index('isp_subscription_package_id');
$table->foreignId('subscriber_id')->nullable()->constrained('isp_subscriber')->onDelete('set null');
$table->foreignId('package_id')->nullable()->constrained('isp_package')->onDelete('set null');
$table->datetime('start_date');
$table->datetime('end_date');

$table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('updated_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('deleted_by')->nullable()->constrained('users')->onDelete('set null');

$table->timestamps();
$table->softDeletes();
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,19 @@ public function up(): void
$table->id();

$table->string('title');
$table->foreignId('subscription_id')->constrained('isp_subscription')->onDelete('cascade')->nullable()->index('isp_payment_subscription_id');
$table->foreignId('invoice_id')->constrained('account_invoice')->onDelete('cascade')->nullable()->index('isp_payment_invoice_id');
$table->foreignId('subscription_id')->nullable()->constrained('isp_subscription')->onDelete('set null');
$table->foreignId('invoice_id')->nullable()->constrained('account_invoice')->onDelete('set null');
$table->string('description')->nullable();
$table->boolean('is_paid')->default(0)->nullable();
$table->boolean('completed')->default(0)->nullable();
$table->boolean('successful')->default(0)->nullable();

$table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('updated_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('deleted_by')->nullable()->constrained('users')->onDelete('set null');

$table->timestamps();
$table->softDeletes();
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,19 @@ public function up(): void

$table->string('title');
$table->string('slug');
$table->foreignId('payment_id')->constrained('isp_payment')->onDelete('cascade')->index('isp_payment_charge_payment_id');
$table->foreignId('ledger_id')->constrained('account_ledger')->onDelete('cascade')->index('isp_payment_charge_ledger_id');
$table->foreignId('payment_id')->nullable()->constrained('isp_payment')->onDelete('set null');
$table->foreignId('ledger_id')->nullable()->constrained('account_ledger')->onDelete('set null');
$table->integer('quantity')->default(1);
$table->string('description')->nullable();
$table->double('price', 8, 2)->nullable();
$table->boolean('published')->default(true)->nullable();

$table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('updated_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('deleted_by')->nullable()->constrained('users')->onDelete('set null');

$table->timestamps();
$table->softDeletes();
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@ public function up(): void
Schema::create('isp_payment_charge_rate', function (Blueprint $table) {
$table->id();

$table->foreignId('payment_charge_id')->constrained('isp_payment_charge')->onDelete('cascade')->index('payment_charge_id');
$table->foreignId('rate_id')->constrained('account_rate')->onDelete('cascade')->index('rate_id');
$table->foreignId('payment_charge_id')->nullable()->constrained('isp_payment_charge')->onDelete('set null');
$table->foreignId('rate_id')->nullable()->constrained('account_rate')->onDelete('set null');

$table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('updated_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('deleted_by')->nullable()->constrained('users')->onDelete('set null');

$table->timestamps();
$table->softDeletes();
});
}

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 6176637

Please sign in to comment.