| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- class CreateTaskTransactionsTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('task_transactions', function (Blueprint $table) {
- $table->id();
- $table->string("doc_code")->nullable()->comment("文档代码");
- $table->string("bar_code")->nullable()->comment("商品条码");
- $table->string("fm_station_id")->nullable()->comment("来源库位");
- $table->string("to_station_id")->nullable()->comment("目标库位");
- $table->string("material_box_id")->nullable()->comment("料箱ID");
- $table->bigInteger("task_id")->nullable()->index()->comment("任务ID");
- $table->bigInteger("commodity_id")->nullable()->comment("商品ID");
- $table->integer("amount")->default(0)->comment("数量");
- $table->enum("type",["出库","入库","移库"])->comment("操作类型");
- $table->tinyInteger("status")->default(0)->comment("事务状态");
- $table->bigInteger("user_id")->nullable()->comment("操作人");
- $table->tinyInteger("mark")->default(0)->comment("标记类型");
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('task_transactions');
- }
- }
|