first version
This commit is contained in:
@@ -22,7 +22,7 @@ return new class extends Migration
|
||||
$table->decimal('total_quantity', 10, 2)->default(0)->comment('订货总量');
|
||||
$table->decimal('total_weight', 10, 3)->default(0)->comment('总重量');
|
||||
$table->decimal('total_amount', 10, 2)->default(0)->comment('订单总金额');
|
||||
$table->integer('status')->default(0)->comment('订单状态(0待汇总 1已汇总 2配送中 3已完成 4已取消)');
|
||||
$table->integer('status')->default(0)->comment('订单状态(0待汇总 1已汇总 2配送中 3已完成 9已取消)');
|
||||
$table->string('remark', 255)->default('')->comment('订单备注');
|
||||
$table->timestamps();
|
||||
$table->index(['store_id', 'order_date'], 'store_order_store_date_index');
|
||||
|
||||
@@ -18,7 +18,7 @@ return new class extends Migration
|
||||
$table->increments('id')->comment('采购单ID');
|
||||
$table->string('purchase_no', 32)->unique()->comment('采购单编号');
|
||||
$table->date('purchase_date')->comment('采购日期');
|
||||
$table->integer('status')->default(0)->comment('采购单状态(0草稿 1已确认 2部分发送 3全部发送 4已完成)');
|
||||
$table->integer('status')->default(0)->comment('采购单状态(0待发送 1部分发送 2全部发送 3已完成)');
|
||||
$table->decimal('total_quantity', 10, 2)->default(0)->comment('采购总量');
|
||||
$table->decimal('total_weight', 10, 3)->default(0)->comment('采购总重量');
|
||||
$table->decimal('estimate_amount', 10, 2)->default(0)->comment('预估金额(按订货汇总)');
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* 待确认事项 #7(已批准):供应商小程序确认接单状态落库
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
if (! Schema::hasColumn('purchase_order_item', 'supplier_confirmed_at')) {
|
||||
Schema::table('purchase_order_item', function (Blueprint $table) {
|
||||
$table->timestamp('supplier_confirmed_at')->nullable()->after('sent_at')->comment('供应商确认接单时间(NULL未确认)');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
if (Schema::hasColumn('purchase_order_item', 'supplier_confirmed_at')) {
|
||||
Schema::table('purchase_order_item', function (Blueprint $table) {
|
||||
$table->dropColumn('supplier_confirmed_at');
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user