From 1b4c5bf02740a4445111e8a717590ccf93ce9c28 Mon Sep 17 00:00:00 2001 From: TL Date: Mon, 16 Jan 2023 09:32:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E8=A1=A8=E7=9A=84comment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2022_12_30_110019_create_product_related.php | 1 + database/migrations/2022_12_30_165725_guest_checkout.php | 8 ++++---- .../migrations/2023_01_10_115702_add_sales2_product.php | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/database/migrations/2022_12_30_110019_create_product_related.php b/database/migrations/2022_12_30_110019_create_product_related.php index 7c26731f..83ab9e86 100644 --- a/database/migrations/2022_12_30_110019_create_product_related.php +++ b/database/migrations/2022_12_30_110019_create_product_related.php @@ -14,6 +14,7 @@ return new class extends Migration public function up() { Schema::create('product_relations', function (Blueprint $table) { + $table->comment('相关商品表'); $table->id(); $table->unsignedInteger('product_id')->comment('商品 ID')->index('product_id'); $table->unsignedInteger('relation_id')->comment('关联商品 ID')->index('relation_id'); diff --git a/database/migrations/2022_12_30_165725_guest_checkout.php b/database/migrations/2022_12_30_165725_guest_checkout.php index ecfb587f..d503b6dd 100644 --- a/database/migrations/2022_12_30_165725_guest_checkout.php +++ b/database/migrations/2022_12_30_165725_guest_checkout.php @@ -18,12 +18,12 @@ return new class extends Migration } Schema::table('carts', function (Blueprint $table) { - $table->string('session_id')->default('')->after('customer_id'); - $table->json('guest_shipping_address')->nullable()->after('shipping_address_id'); - $table->json('guest_payment_address')->nullable()->after('payment_address_id'); + $table->string('session_id')->comment('当前用户会话 ID')->default('')->after('customer_id'); + $table->json('guest_shipping_address')->comment('游客配送地址')->nullable()->after('shipping_address_id'); + $table->json('guest_payment_address')->comment('游客发票地址')->nullable()->after('payment_address_id'); }); Schema::table('cart_products', function (Blueprint $table) { - $table->string('session_id')->default('')->after('customer_id'); + $table->string('session_id')->comment('当前用户会话 ID')->default('')->after('customer_id'); }); } diff --git a/database/migrations/2023_01_10_115702_add_sales2_product.php b/database/migrations/2023_01_10_115702_add_sales2_product.php index 4b076755..44263cd7 100644 --- a/database/migrations/2023_01_10_115702_add_sales2_product.php +++ b/database/migrations/2023_01_10_115702_add_sales2_product.php @@ -18,7 +18,7 @@ return new class extends Migration } Schema::table('products', function (Blueprint $table) { - $table->integer('sales')->default(0)->after('tax_class_id'); + $table->integer('sales')->comment('销量')->default(0)->after('tax_class_id'); }); }