DROP TABLE IF EXISTS `kx_composition_dish`;
CREATE TABLE `kx_composition_dish` (
                                       `id` bigint(20) NOT NULL AUTO_INCREMENT,
                                       `storage_id` bigint(255) unsigned NOT NULL COMMENT '仓库id',
                                       `title` varchar(255) NOT NULL COMMENT '商品名称',
                                       `sales` int(11) NOT NULL DEFAULT '0' COMMENT '销售量',
                                       `img` varchar(255) NOT NULL COMMENT '图片路径',
                                       `detail` text NOT NULL COMMENT '商品详情',
                                       `description` varchar(255) NOT NULL DEFAULT '介绍' COMMENT '介绍',
                                       `category_id` bigint(20) DEFAULT NULL COMMENT '分类id',
                                       `status` int(11) NOT NULL COMMENT '状态1上架0下架',
                                       `score` decimal(2,1) NOT NULL COMMENT '评分',
                                       `create_time` datetime DEFAULT NULL,
                                       `update_time` datetime DEFAULT NULL,
                                       `create_by` varchar(50) DEFAULT NULL COMMENT '编辑人',
                                       `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
                                       PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1893265742607015939 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='组成菜主表';


DROP TABLE IF EXISTS `kx_composition_dish_item`;
CREATE TABLE `kx_composition_dish_item` (
                                            `id` bigint(20) NOT NULL AUTO_INCREMENT,
                                            `product_id` bigint(255) NOT NULL COMMENT '商品规格id',
                                            `category_name` varchar(128) NOT NULL DEFAULT '0' COMMENT '商品类目',
                                            `product_name` varchar(255) DEFAULT NULL COMMENT '商品名称',
                                            `product_attr_name` varchar(255) DEFAULT NULL COMMENT '商品规格',
                                            `bar_code` varchar(255) NOT NULL COMMENT '商品条码',
                                            `unit` varchar(255) NOT NULL COMMENT '单位',
                                            `dish_id` bigint(20) NOT NULL,
                                            `create_time` datetime DEFAULT NULL,
                                            `update_time` datetime DEFAULT NULL,
                                            `create_by` varchar(50) DEFAULT NULL COMMENT '编辑人',
                                            `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
                                            `num` int(11) DEFAULT NULL COMMENT '数量',
                                            PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1697087667467657219 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='组成菜主表';


INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1892921333914808322, '家常菜', 1695601593566232578, 10, '/dish', 'dish/index', NULL, 1, 0, 'C', '0', '0', 'dish:compositiondish:list', '#', 'admin', '2025-02-21 20:56:29', 'admin', '2025-02-22 08:20:40', '');
INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1892921856441200641, '家常菜新增', 1892921333914808322, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'dish:compositiondish:create', '#', 'admin', '2025-02-21 20:58:34', 'admin', '2025-02-21 20:58:34', '');
INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1892921954940235778, '家产菜修改', 1892921333914808322, 2, '', NULL, NULL, 1, 0, 'F', '0', '0', 'dish:compositiondish:edit', '#', 'admin', '2025-02-21 20:58:58', 'admin', '2025-02-21 20:58:58', '');
INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1892922072485605378, '家常菜删除', 1892921333914808322, 3, '', NULL, NULL, 1, 0, 'F', '0', '0', 'dish:compositiondish:delete', '#', 'admin', '2025-02-21 20:59:26', 'admin', '2025-02-21 20:59:26', '');
