2020_03_09_153510_create_stores_table.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateStoresTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('stores', function (Blueprint $table) {
  15. $table->bigIncrements('id');
  16. $table->string('asn_code')->nullable()->unique()->comment('WMS的ASNNO单号');
  17. $table->integer('warehouse_id')->nullable()->comment('仓库ID');
  18. $table->integer('owner_id')->index()->nullable()->comment('货主ID');
  19. $table->enum('stored_method',['正常','快速入库','采购入库','笕尚退货入库单','笕尚进仓入库单','笕尚移仓入库单','B2B入库','笕尚调整入库单','换货入库','初始化库存','虚拟入库','其他入库','退货入库','调拨入库'])->default('正常');
  20. $table->enum('status',['无需入库','已入库','未入库','待推单','完全收货','部分收货','已码盘','订单创建','ASN关闭','等待释放','收货取消'])->default(null)->nullable();
  21. $table->string('remark')->nullable();
  22. $table->timestamp('deleted_at')->nullable()->index();
  23. $table->timestamp('updated_at')->nullable();
  24. $table->timestamp('created_at')->nullable()->index();
  25. });
  26. }
  27. /**
  28. * Reverse the migrations.
  29. *
  30. * @return void
  31. */
  32. public function down()
  33. {
  34. Schema::dropIfExists('stores');
  35. }
  36. }