bigIncrements('id'); $table->integer('company_id')->unsigned()->default(0)->comment('公司ID'); $table->string('purchase_sn', 45)->default('')->comment('采购单号'); $table->json('warehouse_ids')->comment('所属的仓库ID列表'); $table->string('contract_sn', 45)->default('')->comment('采购合同号'); $table->integer('purchase_time')->default(0)->unsigned()->comment('提单日期'); $table->tinyInteger('customer_type')->default(1)->comment('代理类型:1-代理 2-非代理'); $table->tinyInteger('container_type')->default(1)->comment('装卸类型:1拆箱费(整箱) 2上下车费(散货)'); $table->smallInteger('container_count')->default(0)->unsigned()->comment('箱量/车次'); $table->smallInteger('original_count')->default(0)->unsigned()->comment('码单件数'); $table->decimal('original_cube', 12, 4)->default(0)->unsigned()->comment('码单方数'); $table->smallInteger('receiving_container')->default(0)->unsigned()->comment('收到的货柜数或车次'); $table->smallInteger('receiving_count')->default(0)->unsigned()->comment('收货件数'); $table->decimal('receiving_cube', 12, 4)->default(0)->unsigned()->comment('收货方数'); $table->integer('kz_company_id')->default(0)->unsigned()->comment('开证公司id'); $table->string('kz_company_name', 45)->default('')->comment('开证公司'); $table->integer('sh_company_id')->default(0)->unsigned()->comment('收货公司id'); $table->string('sh_company_name', 45)->default('')->comment('收货公司'); $table->string('remark', 255)->default('')->comment('备注'); $table->tinyInteger('is_from_erp')->default(0)->comment('是否erp提交的数据:0否,1是'); $table->integer('erp_return_id')->default(0)->unsigned()->comment('对应的erp退货单id,默认0不是退货单'); $table->tinyInteger('status')->default(1)->comment('状态: 0结束 1正在执行'); MigrateService::migrateCreateInfo($table); $table->comment('采购单表'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('purchase'); } };