erp-backend/database/migrations/2026_03_13_124626_create_warehouses_table.php
2026-04-01 17:07:04 +08:00

29 lines
1.1 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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');
}
};