Files
portal-api/database/migrations/2024_01_31_163018_ticket.php
2025-07-24 16:18:27 +07:00

39 lines
1001 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ticket',function (Blueprint $table) {
$table->id()->autoIncrement();
$table->string('subject',255)->nullable();
$table->integer('ticket_num')->nullable();
$table->text('description')->nullable();
$table->string('room',255)->nullable();
$table->json('data')->nullable();
$table->bigInteger('customer_id')->default(0)->index();
$table->tinyInteger('status')->default(1)->comment('0: close, 1: open');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('ticket');
}
};