品牌代码生成

This commit is contained in:
JeromeSoar
2022-04-25 16:11:30 +08:00
parent 6102c1ce47
commit cc6c3d2759
21 changed files with 1147 additions and 8 deletions

View File

@@ -1 +1,3 @@
DELETE FROM "product_category";
DELETE FROM "product_category";
DELETE FROM "product_brand";

View File

@@ -14,4 +14,21 @@ CREATE TABLE IF NOT EXISTS "product_category" (
"deleted" bit NOT NULL DEFAULT FALSE,
"tenant_id" bigint(20) NOT NULL,
PRIMARY KEY ("id")
) COMMENT '商品分类';
) COMMENT '商品分类';
CREATE TABLE IF NOT EXISTS "product_brand" (
"id" bigint(20) NOT NULL GENERATED BY DEFAULT AS IDENTITY,
"category_id" bigint(20) NOT NULL,
"name" varchar(255) NOT NULL,
"banner_url" varchar(255) NOT NULL,
"sort" int(11),
"description" varchar(1024),
"status" tinyint(4) NOT NULL,
"creator" varchar(64) DEFAULT '',
"create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updater" varchar(64) DEFAULT '',
"update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
"deleted" bit NOT NULL DEFAULT FALSE,
"tenant_id" bigint(20) NOT NULL,
PRIMARY KEY ("id")
) COMMENT '品牌';