spu,sku表结构同步

pull/2/head
franky 2022-05-17 21:18:56 +08:00
parent 279127298b
commit 657e4d035b
1 changed files with 84 additions and 1 deletions

View File

@ -109,4 +109,87 @@ CREATE TABLE `market_activity` (
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '', `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '',
`tenant_id` bigint NOT NULL DEFAULT '0' COMMENT '', `tenant_id` bigint NOT NULL DEFAULT '0' COMMENT '',
PRIMARY KEY (`id`) USING BTREE PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT=''; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='';
--
drop table if exists product_attr_key;
create table product_attr_key
(
id int comment '',
create_time datetime default current_timestamp comment '',
update_time datetime default current_timestamp on update current_timestamp comment '',
creator varchar(64) comment '',
updater varchar(64) comment '',
deleted bit(1) comment '',
attr_name varchar(64) comment '',
status tinyint comment ' 1 2 ',
primary key (id),
key idx_name (attr_name(32)) comment ''
) comment '' character set utf8mb4
collate utf8mb4_general_ci;
--
drop table if exists product_attr_value;
create table product_attr_value
(
id int comment '',
create_time datetime default current_timestamp comment '',
update_time datetime default current_timestamp on update current_timestamp comment '',
creator varchar(64) comment '',
updater varchar(64) comment '',
deleted bit(1) comment '',
attr_key_id varchar(64) comment 'id',
attr_value_name varchar(128) comment '',
status tinyint comment ' 1 2 ',
primary key (id)
) comment '' character set utf8mb4
collate utf8mb4_general_ci;
-- spu
drop table if exists product_spu;
create table product_spu
(
id int comment '',
create_time datetime default current_timestamp comment '',
update_time datetime default current_timestamp on update current_timestamp comment '',
creator varchar(64) comment '',
updater varchar(64) comment '',
deleted bit(1) comment '',
name varchar(128) comment '',
visible bit(1) comment ' true false ',
sell_point varchar(128) not null comment '',
description text not null comment '',
cid int not null comment 'id',
list_pic_url varchar(128) comment '',
pic_urls varchar(1024) not null default '' comment ', , 15',
sort int not null default 0 comment '',
like_count int comment '',
price int comment '',
quantity int comment '',
primary key (id)
) comment 'spu' character set utf8mb4
collate utf8mb4_general_ci;
-- sku
drop table if exists product_sku;
create table product_sku
(
id int comment '',
create_time datetime default current_timestamp comment '',
update_time datetime default current_timestamp on update current_timestamp comment '',
creator varchar(64) comment '',
updater varchar(64) comment '',
deleted bit(1) comment '',
spu_id int not null comment 'spu',
sku_status tinyint comment ' 1- 2-',
attrs varchar(64) not null comment ' ',
price int not null DEFAULT -1 comment '',
original_price int not null DEFAULT -1 comment ' ',
cost_price int not null DEFAULT -1 comment ' ',
bar_code varchar(64) not null comment '',
pic_url VARCHAR(128) not null comment '',
primary key (id)
) comment 'sku' character set utf8mb4
collate utf8mb4_general_ci;