[WIP] Update Claim Table

This commit is contained in:
R
2022-12-05 16:20:09 +07:00
parent 3bc8877740
commit 885edec290
6 changed files with 69 additions and 17 deletions

View File

@@ -13,22 +13,22 @@ return new class extends Migration
*/
public function up()
{
Schema::create('corporate_plans', function (Blueprint $table) {
$table->id();
$table->foreignId('corporate_id')->nullable()->index();
$table->string('code')->index();
$table->string('name')->nullable();
$table->text('description')->nullable();
$table->boolean('active')->default(true);
$table->timestamps();
$table->softDeletes();
// Schema::create('corporate_plans', function (Blueprint $table) {
// $table->id();
// $table->foreignId('corporate_id')->nullable()->index();
// $table->string('code')->index();
// $table->string('name')->nullable();
// $table->text('description')->nullable();
// $table->boolean('active')->default(true);
// $table->timestamps();
// $table->softDeletes();
$table->foreignId('created_by')->nullable()->index();
$table->foreignId('updated_by')->nullable()->index();
$table->foreignId('deleted_by')->nullable()->index();
// $table->foreignId('created_by')->nullable()->index();
// $table->foreignId('updated_by')->nullable()->index();
// $table->foreignId('deleted_by')->nullable()->index();
$table->unique(["corporate_id", "code"], 'corporate_plans_unique');
});
// $table->unique(["corporate_id", "code"], 'corporate_plans_unique');
// });
}
/**
@@ -38,6 +38,6 @@ return new class extends Migration
*/
public function down()
{
Schema::dropIfExists('corporate_plans');
// Schema::dropIfExists('corporate_plans');
}
};

View File

@@ -22,6 +22,21 @@ return new class extends Migration
$table->string('currency');
$table->foreignId('plan_id')->index();
$table->foreignId('benefit_id')->index();
$table->dateTime('requested_at')->nullable();
$table->unsignedBigInteger('requested_by')->nullable()->index();
$table->dateTime('received_at')->nullable();
$table->unsignedBigInteger('received_by')->nullable()->index();
$table->dateTime('approved_at')->nullable();
$table->unsignedBigInteger('approved_by')->nullable()->index();
$table->dateTime('approved_at')->nullable();
$table->unsignedBigInteger('approved_by')->nullable()->index();
$table->dateTime('paid_at')->nullable();
$table->unsignedBigInteger('paid_by')->nullable()->index();
$table->timestamps();
$table->softDeletes();