init2
This commit is contained in:
117
doc/sql/mall.sql
Normal file
117
doc/sql/mall.sql
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
drop table if exists mall_spu;
|
||||||
|
create table mall_spu
|
||||||
|
(
|
||||||
|
id bigint not null comment '主键',
|
||||||
|
goods_id int default 0 not null comment '商品id',
|
||||||
|
supply_type int default 0 not null comment '渠道(1京东,2星链,3测试,4云商特卖 ,5厂商特卖,6天猫,7微唯宝特卖,8云链专供,9三方仓储,10华南一仓,11华南二仓)',
|
||||||
|
spu_sn varchar(255) default '' not null comment '商品编码',
|
||||||
|
spu_name varchar(255) default '' not null comment '商品名称',
|
||||||
|
main_img varchar(255) default '' not null comment '主图',
|
||||||
|
detail_img text null comment '详情图(多图,逗号分割)',
|
||||||
|
brand_name varchar(255) default '' not null comment '品牌名称',
|
||||||
|
cate_id int default 0 not null comment 'cate_id分类',
|
||||||
|
limit_num int default 0 not null comment '限购数量',
|
||||||
|
lowest_num int default 0 not null comment '起售数量(单个规格的起购数不能代表整个商品的起购数,具体起购数量查询sku详情接口)',
|
||||||
|
cost_price decimal(10, 2) default 0.00 not null comment '成本价',
|
||||||
|
retail_price decimal(10, 2) default 0.00 not null comment '销售价',
|
||||||
|
floor_price decimal(10, 2) default 0.00 not null comment '最低价',
|
||||||
|
no_deliver varchar(255) default '' not null comment '非配送地区(多个值,逗号分割)',
|
||||||
|
top_img text null comment '顶图(多图,逗号分割)',
|
||||||
|
bottom_img text null comment '底图(多图,逗号分割)',
|
||||||
|
create_user bigint null comment '创建人',
|
||||||
|
create_dept bigint null comment '创建部门',
|
||||||
|
create_time datetime null comment '创建时间',
|
||||||
|
update_user bigint null comment '修改人',
|
||||||
|
update_time datetime null comment '修改时间',
|
||||||
|
status int default 0 null comment '状态(0=下架,1=上架,3=删除)',
|
||||||
|
is_deleted int default 0 null comment '是否已删除',
|
||||||
|
PRIMARY KEY (`id`) USING BTREE
|
||||||
|
) ENGINE = InnoDB
|
||||||
|
CHARACTER SET = utf8mb4
|
||||||
|
COLLATE = utf8mb4_general_ci COMMENT = '商城spu'
|
||||||
|
ROW_FORMAT = Dynamic;
|
||||||
|
|
||||||
|
drop table if exists mall_sku;
|
||||||
|
create table mall_sku
|
||||||
|
(
|
||||||
|
id bigint not null comment '主键',
|
||||||
|
spu_id bigint not null comment 'mall_spu表主键',
|
||||||
|
sku_id int default 0 not null comment 'sku_id',
|
||||||
|
supply_type int default 0 not null comment '渠道(1京东,2星链,3测试,4云商特卖 ,5厂商特卖,6天猫,7微唯宝特卖,8云链专供,9三方仓储,10华南一仓,11华南二仓)',
|
||||||
|
factory_id int default 0 not null comment 'factory_id',
|
||||||
|
goods_id int default 0 not null comment '商品id',
|
||||||
|
spu_sn varchar(255) default '' not null comment 'spu_sn',
|
||||||
|
sku_sn varchar(255) default '' not null comment 'sku_sn',
|
||||||
|
sku_name varchar(255) default '' not null comment '规格名称',
|
||||||
|
main_img varchar(255) default '' not null comment '主图',
|
||||||
|
detail_img text null comment '详情图(多图,逗号分割)',
|
||||||
|
lowest_num int default 0 not null comment '起售数量',
|
||||||
|
attr json null comment '属性(array)',
|
||||||
|
cost_price decimal(10, 2) default 0.00 not null comment '成本价',
|
||||||
|
retail_price decimal(10, 2) default 0.00 not null comment '销售价',
|
||||||
|
floor_price decimal(10, 2) default 0.00 not null comment '最低价',
|
||||||
|
create_user bigint null comment '创建人',
|
||||||
|
create_dept bigint null comment '创建部门',
|
||||||
|
create_time datetime null comment '创建时间',
|
||||||
|
update_user bigint null comment '修改人',
|
||||||
|
update_time datetime null comment '修改时间',
|
||||||
|
status int default 0 null comment '状态(0=下架,1=上架,3=删除)',
|
||||||
|
is_deleted int default 0 null comment '是否已删除',
|
||||||
|
PRIMARY KEY (`id`) USING BTREE
|
||||||
|
) ENGINE = InnoDB
|
||||||
|
CHARACTER SET = utf8mb4
|
||||||
|
COLLATE = utf8mb4_general_ci COMMENT = '商城sku'
|
||||||
|
ROW_FORMAT = Dynamic;
|
||||||
|
|
||||||
|
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
|
||||||
|
VALUES ('1718103285645770753', 1123598815738675201, 'sku', '商品SKU表', 'menu', '/sku/sku', NULL, 1, 1, 0, 1, NULL, 0);
|
||||||
|
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
|
||||||
|
VALUES ('1718103285645770754', '1718103285645770753', 'sku_add', '新增', 'add', '/sku/sku/add', 'plus', 1, 2, 1, 1, NULL, 0);
|
||||||
|
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
|
||||||
|
VALUES ('1718103285645770755', '1718103285645770753', 'sku_edit', '修改', 'edit', '/sku/sku/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
||||||
|
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
|
||||||
|
VALUES ('1718103285645770756', '1718103285645770753', 'sku_delete', '删除', 'delete', '/api/blade-sku/sku/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
||||||
|
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
|
||||||
|
VALUES ('1718103285645770757', '1718103285645770753', 'sku_view', '查看', 'view', '/sku/sku/view', 'file-text', 4, 2, 2, 1, NULL, 0);
|
||||||
|
|
||||||
|
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
|
||||||
|
VALUES ('1803642703151980546', 1123598815738675201, 'spu', '商城spu', 'menu', '/spu/spu', NULL, 1, 1, 0, 1, NULL, 0);
|
||||||
|
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
|
||||||
|
VALUES ('1803642703151980547', '1803642703151980546', 'spu_add', '新增', 'add', '/spu/spu/add', 'plus', 1, 2, 1, 1, NULL, 0);
|
||||||
|
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
|
||||||
|
VALUES ('1803642703151980548', '1803642703151980546', 'spu_edit', '修改', 'edit', '/spu/spu/edit', 'form', 2, 2, 2, 1, NULL, 0);
|
||||||
|
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
|
||||||
|
VALUES ('1803642703151980549', '1803642703151980546', 'spu_delete', '删除', 'delete', '/api/blade-spu/spu/remove', 'delete', 3, 2, 3, 1, NULL, 0);
|
||||||
|
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
|
||||||
|
VALUES ('1803642703151980550', '1803642703151980546', 'spu_view', '查看', 'view', '/spu/spu/view', 'file-text', 4, 2, 2, 1, NULL, 0);
|
||||||
|
|
||||||
|
drop table if exists user_address;
|
||||||
|
create table user_address
|
||||||
|
(
|
||||||
|
id bigint not null comment '主键',
|
||||||
|
user_id bigint not null comment '用户id',
|
||||||
|
regions_info_id bigint not null comment 'regions_info表主键',
|
||||||
|
wiwibao_region_id bigint default 0 not null comment '微唯宝地区id',
|
||||||
|
province varchar(255) default '' not null comment '省',
|
||||||
|
city varchar(255) default '' not null comment '市',
|
||||||
|
district varchar(255) default '' not null comment '区',
|
||||||
|
street varchar(255) default '' not null comment '街道',
|
||||||
|
detail varchar(255) default '' not null comment '详细地址',
|
||||||
|
consignee varchar(255) default '' not null comment '联系人',
|
||||||
|
phone varchar(255) default '' not null comment '联系电话',
|
||||||
|
latitude decimal(20, 8) default 0.00000000 not null comment '纬度',
|
||||||
|
longitude decimal(20, 8) default 0.00000000 not null comment '经度',
|
||||||
|
is_default int default 0 not null comment '默认(0=否,1=是)',
|
||||||
|
remark varchar(255) default '' not null comment '备注',
|
||||||
|
create_user bigint null comment '创建人',
|
||||||
|
create_dept bigint null comment '创建部门',
|
||||||
|
create_time datetime null comment '创建时间',
|
||||||
|
update_user bigint null comment '修改人',
|
||||||
|
update_time datetime null comment '修改时间',
|
||||||
|
status int default 0 null comment '状态(0=下架,1=上架,3=删除)',
|
||||||
|
is_deleted int default 0 null comment '是否已删除',
|
||||||
|
PRIMARY KEY (`id`) USING BTREE
|
||||||
|
) ENGINE = InnoDB
|
||||||
|
CHARACTER SET = utf8mb4
|
||||||
|
COLLATE = utf8mb4_general_ci COMMENT = '用户地址'
|
||||||
|
ROW_FORMAT = Dynamic;
|
||||||
Reference in New Issue
Block a user