You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
3.5 KiB
43 lines
3.5 KiB
CREATE TABLE `dhc_product_category` ( |
|
`category_id` bigint NOT NULL AUTO_INCREMENT COMMENT '分类ID', |
|
`category_code` varchar(10) COLLATE utf8mb4_general_ci NOT NULL COMMENT '分类编码', |
|
`category_name` varchar(100) COLLATE utf8mb4_general_ci NOT NULL COMMENT '分类名称', |
|
`category_name_en` varchar(200) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '分类英文名称', |
|
`product_line` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '产品线', |
|
`product_line_code` varchar(10) COLLATE utf8mb4_general_ci NOT NULL COMMENT '产品线编码', |
|
`parent_id` bigint DEFAULT '0' COMMENT '父分类ID', |
|
`ancestors` varchar(500) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '祖级列表', |
|
`category_level` char(1) COLLATE utf8mb4_general_ci NOT NULL COMMENT '分类级别(1大类 2中类 3小类)', |
|
`order_num` int DEFAULT '0' COMMENT '显示顺序', |
|
`status` char(1) COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '状态(0正常 1停用)', |
|
`del_flag` char(1) COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '删除标志(0代表存在 2代表删除)', |
|
`create_by` varchar(64) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者', |
|
`create_time` datetime DEFAULT NULL COMMENT '创建时间', |
|
`update_by` varchar(64) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者', |
|
`update_time` datetime DEFAULT NULL COMMENT '更新时间', |
|
`remark` varchar(500) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注', |
|
PRIMARY KEY (`category_id`) |
|
) ENGINE=InnoDB AUTO_INCREMENT=211 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='产品分类表'; |
|
|
|
|
|
--------------------------------------------------------------------------------------------------------- |
|
-- 菜单与权限 |
|
-- 菜单 SQL |
|
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) |
|
values('产品分类管理', '3', '1', 'category', 'gss/category/index', 1, 0, 'C', '0', '0', 'gss:category:list', 'tree', 'admin', sysdate(), '', null, '产品分类管理菜单'); |
|
|
|
-- 按钮父菜单ID |
|
SELECT @parentId := LAST_INSERT_ID(); |
|
|
|
-- 按钮 SQL |
|
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) |
|
values('产品分类查询', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', 'gss:category:query', '#', 'admin', sysdate(), '', null, ''); |
|
|
|
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) |
|
values('产品分类新增', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', 'gss:category:add', '#', 'admin', sysdate(), '', null, ''); |
|
|
|
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) |
|
values('产品分类修改', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', 'gss:category:edit', '#', 'admin', sysdate(), '', null, ''); |
|
|
|
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) |
|
values('产品分类删除', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', 'gss:category:remove', '#', 'admin', sysdate(), '', null, ''); |