39 lines
1001 B
PHP
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');
|
|
}
|
|
};
|