29 lines
1.1 KiB
PHP
29 lines
1.1 KiB
PHP
<?php
|
||
|
||
use Illuminate\Database\Migrations\Migration;
|
||
use Illuminate\Database\Schema\Blueprint;
|
||
use Illuminate\Support\Facades\Schema;
|
||
|
||
return new class extends Migration
|
||
{
|
||
public function up(): void
|
||
{
|
||
Schema::create('warehouses', function (Blueprint $table) {
|
||
$table->id();
|
||
$table->string('name')->comment('仓库名称');
|
||
$table->enum('type', ['erp', 'cloud'])->default('erp')->comment('仓库类型:ERP仓库/云仓');
|
||
$table->enum('cloud_system', ['jst', 'wdt', 'qimen'])->nullable()->comment('云仓系统(当type=cloud时有效)');
|
||
$table->string('owner_code')->nullable()->comment('货主编码');
|
||
$table->string('cloud_code')->nullable()->comment('云仓编码');
|
||
$table->string('app_key')->nullable()->comment('云仓AppKey');
|
||
$table->string('app_secret')->nullable()->comment('云仓AppSecret');
|
||
$table->text('remark')->nullable()->comment('备注');
|
||
$table->timestamps();
|
||
});
|
||
}
|
||
|
||
public function down(): void
|
||
{
|
||
Schema::dropIfExists('warehouses');
|
||
}
|
||
}; |