added personal_carts and put dynamic client

This commit is contained in:
hafifierahman
2024-12-08 00:44:38 +08:00
parent 0a1e8dc523
commit 4501449bb1
11 changed files with 296 additions and 59 deletions
@@ -0,0 +1,40 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCartsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('personal_carts', function (Blueprint $table) {
$table->id();
$table->string('ic_no');
$table->json('list_pkb');
$table->json('list_koop');
$table->enum('status_pkb', ['PENDING', 'PAID','NONE']);
$table->enum('status_koop', ['PENDING', 'PAID','NONE']);
$table->softDeletes();
$table->unsignedBigInteger('user_id');
$table->timestamps();
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('personal_carts');
}
}