批量对账
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
* 采购单单品对账标记:商品明细「已对账」勾选入库持久化(替代原前端 localStorage 本地标记)
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
if (! Schema::hasTable('purchase_item_check')) {
|
||||
Schema::create('purchase_item_check', function (Blueprint $table) {
|
||||
$table->increments('id')->comment('标记ID');
|
||||
$table->integer('purchase_id')->comment('采购单ID');
|
||||
$table->integer('product_id')->comment('商品ID');
|
||||
$table->integer('operator_id')->default(0)->comment('标记人(后台系统用户ID)');
|
||||
$table->timestamps();
|
||||
$table->unique(['purchase_id', 'product_id'], 'purchase_item_check_unique');
|
||||
$table->comment('采购单单品对账标记表(商品明细「已对账」勾选)');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('purchase_item_check');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user