63 lines
2.1 KiB
PHP
63 lines
2.1 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
class LoyaltyCard extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('loyalty_card', function (Blueprint $table) {
|
|
$table->increments('lcard_id');
|
|
$table->uuid('lcard_uuid')->unique();
|
|
$table->integer('pd_id');
|
|
$table->integer('lcard_s_id'); // CR1
|
|
$table->string('card_number', 16);
|
|
$table->string('pin', 16);
|
|
$table->integer('cardtype_id');
|
|
$table->dateTime('expiry_date');
|
|
$table->date('birthdate');
|
|
$table->string('mobile',32);
|
|
$table->string('email',64);
|
|
$table->integer('civilstatus_id');
|
|
$table->integer('gender_id');
|
|
$table->integer('vo_id');
|
|
$table->integer('city_id');
|
|
$table->string('city_name',64);
|
|
$table->integer('fueltype_id');
|
|
$table->boolean('is_validated')->default(0);
|
|
$table->datetime('validation_dt')->nullable();
|
|
$table->boolean('is_locked')->default(0);
|
|
$table->string('lock_code',10)->default('');
|
|
$table->dateTime('lock_dt')->nullable();
|
|
$table->string('deviceUUID',64);
|
|
$table->double('total_pts_earn')->default(0);
|
|
$table->double('total_pts_redeem')->default(0);
|
|
$table->double('total_pts_bal')->default(0);
|
|
$table->timestamps();
|
|
$table->integer('created_by')->default(0);
|
|
$table->integer('updated_by')->default(0);
|
|
$table->dateTime('last_synchronized')->nullable();
|
|
$table->boolean('is_active')->default(1);
|
|
$table->boolean('cyware_synced')->default(0);
|
|
$table->boolean('cyware_deactivated')->default(0);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('loyalty_card');
|
|
}
|
|
}
|