/* Navicat Premium Data Transfer Source Server : 主机 Source Server Type : MySQL Source Server Version : 50718 (5.7.18-log) Source Host : localhost:3306 Source Schema : la_goods Target Server Type : MySQL Target Server Version : 50718 (5.7.18-log) File Encoding : 65001 Date: 16/05/2024 11:14:02 */ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for t_goods_brand -- ---------------------------- DROP TABLE IF EXISTS `t_goods_brand`; CREATE TABLE `t_goods_brand` ( `id` bigint(20) NOT NULL COMMENT '品牌id', `brand_name` varchar(55) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '品牌名称', `create_by` varchar(55) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者', `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', `update_by` varchar(55) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者', `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', `del_flag` tinyint(4) NULL DEFAULT 0 COMMENT '删除标志(0代表存在 1代表删除)', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '品牌表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of t_goods_brand -- ---------------------------- -- ---------------------------- -- Table structure for t_goods_category -- ---------------------------- DROP TABLE IF EXISTS `t_goods_category`; CREATE TABLE `t_goods_category` ( `id` bigint(20) NOT NULL COMMENT '商品分类id', `category_name` varchar(55) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '分类名称', `create_by` varchar(55) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者', `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', `update_by` varchar(55) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者', `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', `del_flag` tinyint(4) NULL DEFAULT 0 COMMENT '删除标志(0代表存在 1代表删除)', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品分类表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of t_goods_category -- ---------------------------- -- ---------------------------- -- Table structure for t_goods_flavor_type -- ---------------------------- DROP TABLE IF EXISTS `t_goods_flavor_type`; CREATE TABLE `t_goods_flavor_type` ( `id` bigint(20) NOT NULL COMMENT '香型id', `flavor_type_name` varchar(55) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '香型名称', `create_by` varchar(55) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者', `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', `update_by` varchar(55) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者', `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', `del_flag` tinyint(4) NULL DEFAULT 0 COMMENT '删除标志(0代表存在 1代表删除)', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '香型表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of t_goods_flavor_type -- ---------------------------- -- ---------------------------- -- Table structure for t_goods_group_purchase -- ---------------------------- DROP TABLE IF EXISTS `t_goods_group_purchase`; CREATE TABLE `t_goods_group_purchase` ( `id` bigint(20) NOT NULL COMMENT '商品团购id', `goods_sku_id` bigint(20) NOT NULL COMMENT '商品id', `goods_sku_name` varchar(55) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商品名称', `share_title` varchar(55) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '分享标题', `share_pic` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '分享图片', `group_purchase_price` decimal(10, 0) NOT NULL COMMENT '团购价格', `group_size` int(11) NOT NULL COMMENT '成团人数', `limit_number` int(11) NOT NULL COMMENT '限购数量', `start_time` datetime NOT NULL COMMENT '团购开始时间', `end_time` datetime NOT NULL COMMENT '团购结束时间', `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '参团说明', `start_status` tinyint(4) NULL DEFAULT NULL COMMENT '开始状态 0=未开始 1=已开始 2=已结束 ', `listing_status` tinyint(4) NULL DEFAULT NULL COMMENT '上架状态 0=已上架 1=已下架', `group_status` tinyint(4) NULL DEFAULT NULL COMMENT '成团状态 0=待成团 1=已成团 2=成团失败', `create_by` varchar(55) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者', `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', `update_by` varchar(55) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者', `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', `del_flag` tinyint(4) NULL DEFAULT NULL COMMENT '删除标志(0代表存在 1代表删除)', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品团购表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of t_goods_group_purchase -- ---------------------------- -- ---------------------------- -- Table structure for t_goods_info_title -- ---------------------------- DROP TABLE IF EXISTS `t_goods_info_title`; CREATE TABLE `t_goods_info_title` ( `id` bigint(20) NOT NULL COMMENT '商品信息标题id', `title_name` varchar(55) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '标题名称', `create_by` varchar(55) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者', `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', `update_by` varchar(55) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者', `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', `del_flag` tinyint(4) NULL DEFAULT 0 COMMENT '删除标志(0代表存在 1代表删除)', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品信息标题表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of t_goods_info_title -- ---------------------------- -- ---------------------------- -- Table structure for t_goods_info_title_value -- ---------------------------- DROP TABLE IF EXISTS `t_goods_info_title_value`; CREATE TABLE `t_goods_info_title_value` ( `id` bigint(20) NOT NULL COMMENT '商品信息标题值id', `goods_sku_id` bigint(20) NOT NULL COMMENT '商品sku id', `goods_info_title_id` bigint(20) NOT NULL COMMENT '商品信息标题id', `content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容', `sort_num` int(11) NULL DEFAULT NULL COMMENT '排序', `create_by` varchar(55) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者', `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', `update_by` varchar(55) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者', `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', `del_flag` tinyint(4) NULL DEFAULT 0 COMMENT '删除标志(0代表存在 1代表删除)', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品信息标题值表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of t_goods_info_title_value -- ---------------------------- -- ---------------------------- -- Table structure for t_goods_seckill -- ---------------------------- DROP TABLE IF EXISTS `t_goods_seckill`; CREATE TABLE `t_goods_seckill` ( `id` bigint(20) NOT NULL COMMENT '商品秒杀id', `goods_sku_id` bigint(20) NOT NULL COMMENT '商品id', `goods_sku_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '商品名称', `current_stock` int(11) NULL DEFAULT NULL COMMENT '当前库存', `seckill_price` decimal(10, 0) NULL DEFAULT NULL COMMENT '秒杀价格', `seckill_stock` int(11) NULL DEFAULT NULL COMMENT '秒杀库存', `limit_number` int(6) NULL DEFAULT NULL COMMENT '限购数量', `sort_num` int(6) NULL DEFAULT NULL COMMENT '排序', `share_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '分享标题', `share_pic` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '分享图片', `start_time` datetime NOT NULL COMMENT '秒杀开始时间', `end_time` datetime NOT NULL COMMENT '秒杀结束时间', `create_by` varchar(55) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者', `start_status` tinyint(4) NULL DEFAULT 0 COMMENT '开始状态 0=未开始 1= 已开始 2=已结束', `listing_status` tinyint(4) NULL DEFAULT 0 COMMENT '上架状态 0=已上架 1=已下架', `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', `update_by` varchar(55) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者', `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', `del_flag` tinyint(4) NULL DEFAULT 0 COMMENT '删除标志(0代表存在 1代表删除)', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品秒杀表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of t_goods_seckill -- ---------------------------- -- ---------------------------- -- Table structure for t_goods_series -- ---------------------------- DROP TABLE IF EXISTS `t_goods_series`; CREATE TABLE `t_goods_series` ( `id` bigint(20) NOT NULL COMMENT '系列id', `series_name` varchar(55) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '系列名称', `create_by` varchar(55) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者', `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', `update_by` varchar(55) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者', `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', `del_flag` tinyint(4) NULL DEFAULT 0 COMMENT '删除标志(0代表存在 1代表删除)', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系列表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of t_goods_series -- ---------------------------- -- ---------------------------- -- Table structure for t_goods_sku -- ---------------------------- DROP TABLE IF EXISTS `t_goods_sku`; CREATE TABLE `t_goods_sku` ( `id` bigint(20) NOT NULL COMMENT '商品id', `sku_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品名称', `years` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品年份', `category_id` bigint(20) NOT NULL COMMENT '商品分类id', `series_id` bigint(20) NOT NULL COMMENT '商品系列id', `brand_id` bigint(20) NOT NULL COMMENT '商品品牌id', `flavor_type_id` bigint(20) NOT NULL COMMENT '商品香型id', `price` decimal(10, 0) NOT NULL COMMENT '商品价格', `stock` int(11) NOT NULL COMMENT '库存', `unit` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '单位', `spec` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '规格', `spec_unit` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '规格单位', `cover_pic` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '封面图', `alubm` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '详情图,不超过五张图片', `share_title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '分享标题', `share_pic` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '分享图片', `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品描述', `detail` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品说明', `sort_num` int(11) NULL DEFAULT NULL COMMENT '排序', `listing_status` tinyint(4) NULL DEFAULT 0 COMMENT '上架状态 0=上架中 1= 已下架', `create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者', `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', `update_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者', `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间', `del_flag` tinyint(4) NULL DEFAULT 0 COMMENT '删除标志(0代表存在 1代表删除)', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of t_goods_sku -- ---------------------------- -- ---------------------------- -- Table structure for undo_log -- ---------------------------- DROP TABLE IF EXISTS `undo_log`; CREATE TABLE `undo_log` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `branch_id` bigint(20) NOT NULL, `xid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `context` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `rollback_info` longblob NOT NULL, `log_status` int(11) NOT NULL, `log_created` datetime NOT NULL, `log_modified` datetime NOT NULL, `ext` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `ux_undo_log`(`xid`, `branch_id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of undo_log -- ---------------------------- SET FOREIGN_KEY_CHECKS = 1;