|
|
@@ -0,0 +1,42 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+use Illuminate\Database\Migrations\Migration;
|
|
|
+use Illuminate\Database\Schema\Blueprint;
|
|
|
+use Illuminate\Support\Facades\Schema;
|
|
|
+
|
|
|
+class CreateWorkOrdersTable extends Migration
|
|
|
+{
|
|
|
+ /**
|
|
|
+ * Run the migrations.
|
|
|
+ *
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function up()
|
|
|
+ {
|
|
|
+ Schema::create('work_orders', function (Blueprint $table) {
|
|
|
+ $table->id();
|
|
|
+ $table->integer('creator_id')->comment('创建人');
|
|
|
+ $table->integer('reviewer_id')->comment('审核人');
|
|
|
+ $table->integer('work_order_type_id')->comment('类型');
|
|
|
+ $table->integer('work_order_child_type_id')->comment('子类型');
|
|
|
+ $table->string('outer_table_name')->comment('关联表名');
|
|
|
+ $table->integer('outer_table_id')->comment('关联表id');
|
|
|
+ $table->tinyInteger('grad')->comment('工单等级');
|
|
|
+ $table->tinyInteger('status')->comment('工单状态');
|
|
|
+ $table->string('remark')->comment('描述信息');
|
|
|
+ $table->dateTime('review_at')->default(null)->nullable()->comment('审核时间');
|
|
|
+ $table->softDeletes();
|
|
|
+ $table->timestamps();
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Reverse the migrations.
|
|
|
+ *
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function down()
|
|
|
+ {
|
|
|
+ Schema::dropIfExists('work_orders');
|
|
|
+ }
|
|
|
+}
|