/*
 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_auction

 Target Server Type    : MySQL
 Target Server Version : 50718 (5.7.18-log)
 File Encoding         : 65001

 Date: 16/05/2024 11:29:30
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for t_auction_bid_record
-- ----------------------------
DROP TABLE IF EXISTS `t_auction_bid_record`;
CREATE TABLE `t_auction_bid_record`  (
                                         `id` bigint(20) NOT NULL COMMENT '出价记录id',
                                         `auction_salesroom_id` bigint(20) NOT NULL COMMENT '拍卖场id',
                                         `goods_sku_id` bigint(20) NOT NULL COMMENT '商品id',
                                         `member_id` bigint(20) NOT NULL COMMENT '会员id',
                                         `goods_sku_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商品名称',
                                         `last_bid_time` datetime NULL DEFAULT NULL COMMENT '最终出价时间',
                                         `bid_count` smallint(6) NULL DEFAULT 0 COMMENT '出价次数',
                                         `last_bid_amount` decimal(10, 0) 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_auction_bid_record
-- ----------------------------

-- ----------------------------
-- Table structure for t_auction_goods
-- ----------------------------
DROP TABLE IF EXISTS `t_auction_goods`;
CREATE TABLE `t_auction_goods`  (
                                    `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 '' COMMENT '商品名称',
                                    `starting_price` decimal(10, 0) NOT NULL COMMENT '起拍价格',
                                    `minimum_markup_amount` decimal(10, 0) NOT NULL COMMENT '最低加价金额',
                                    `start_time` datetime NOT NULL COMMENT '开始时间',
                                    `end_time` datetime NOT NULL COMMENT '结束时间',
                                    `quantity` int(11) NOT NULL COMMENT '拍品数量',
                                    `bond` decimal(10, 0) NULL DEFAULT NULL COMMENT '保证金',
                                    `authentication` tinyint(4) NOT NULL COMMENT '实名认证 0=不需实名 1=需要实名',
                                    `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '拍品说明',
                                    `listing_status` tinyint(4) NULL DEFAULT 0 COMMENT '上架状态 0=上架中 1=已下架',
                                    `start_status` tinyint(4) NULL DEFAULT 0 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 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_auction_goods
-- ----------------------------

-- ----------------------------
-- Table structure for t_auction_salesroom
-- ----------------------------
DROP TABLE IF EXISTS `t_auction_salesroom`;
CREATE TABLE `t_auction_salesroom`  (
                                        `id` bigint(20) NOT NULL,
                                        `salesroom_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '拍卖场名称',
                                        `start_time` datetime NULL DEFAULT NULL COMMENT '开始时间',
                                        `type` tinyint(4) NULL DEFAULT NULL COMMENT '拍卖时间 0=线下拍卖 1=线上线下结合',
                                        `bound` decimal(10, 0) NULL DEFAULT NULL COMMENT '保证金',
                                        `authentication` tinyint(4) NULL DEFAULT NULL COMMENT '实名认证 0=不需认证 1=需要实名',
                                        `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '拍卖场说明',
                                        `cover_pic` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '拍卖场封面图',
                                        `share_title` varchar(55) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '分享标题',
                                        `share_pic` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '分享图片',
                                        `status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '拍卖状态 0=预展中 1=拍卖中 2=已结束',
                                        `auction_salesroom_qrcode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' 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_auction_salesroom
-- ----------------------------

-- ----------------------------
-- Table structure for t_auction_salesroom_goods
-- ----------------------------
DROP TABLE IF EXISTS `t_auction_salesroom_goods`;
CREATE TABLE `t_auction_salesroom_goods`  (
                                              `id` bigint(20) NOT NULL COMMENT '拍卖场商品关系id',
                                              `auction_salesroom_id` bigint(20) NULL DEFAULT NULL COMMENT '拍卖场id',
                                              `goods_sku_id` bigint(20) NULL DEFAULT NULL COMMENT '商品id',
                                              `goods_sku_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '商品名称',
                                              `starting_price` decimal(10, 0) NULL DEFAULT NULL COMMENT '起拍价格',
                                              `minimum_markup_amount` decimal(10, 0) NULL DEFAULT NULL COMMENT '最低加价金额',
                                              `item_quantity` int(6) NULL DEFAULT NULL COMMENT '拍品数量',
                                              `guaranteed_trade_volume` int(6) NULL DEFAULT NULL COMMENT '兜底成交个数',
                                              `listing_duration` int(6) NULL DEFAULT NULL COMMENT '拍卖时间（分钟）',
                                              `backup_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '设为备选',
                                              `status` tinyint(4) NULL DEFAULT 0 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 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_auction_salesroom_goods
-- ----------------------------

-- ----------------------------
-- 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;
