| Total Complexity | 2 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | return new class extends Migration |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Run the migrations. |
||
| 15 | * |
||
| 16 | * @return void |
||
| 17 | */ |
||
| 18 | public function up() |
||
| 19 | { |
||
| 20 | Schema::create('customers', function (Blueprint $table) { |
||
| 21 | $table->id(); |
||
| 22 | |||
| 23 | $table->string('telegram_chat_id'); |
||
| 24 | $table->string('username'); |
||
| 25 | $table->string('fullname'); |
||
| 26 | $table->string('gender')->default(Gender::undefined()); |
||
| 27 | $table->string('email')->unique(); |
||
| 28 | $table->string('phone_country')->default(env('PHONE_COUNTRY', 'ID')); |
||
| 29 | $table->string('phone')->unique(); |
||
| 30 | $table->string('whatsapp_phone_country')->default(env('PHONE_COUNTRY', 'ID')); |
||
| 31 | $table->string('whatsapp_phone')->unique(); |
||
| 32 | $table->string('account_number')->nullable()->comment('nomor rekening bank'); |
||
| 33 | $table->string('identitycard_number')->nullable()->comment('nomor ktp'); |
||
| 34 | $table->string('identitycard_image')->nullable()->comment('foto ktp'); |
||
| 35 | $table->string('location_latitude')->nullable(); |
||
| 36 | $table->string('location_longitude')->nullable(); |
||
| 37 | $table->timestamps(); |
||
| 38 | }); |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Reverse the migrations. |
||
| 43 | * |
||
| 44 | * @return void |
||
| 45 | */ |
||
| 46 | public function down() |
||
| 49 | } |
||
| 50 | }; |
||
| 51 |