/*
 Navicat Premium Data Transfer

 Source Server         : 01_47.113.200.81
 Source Server Type    : MySQL
 Source Server Version : 50716
 Source Host           : 47.113.200.81:3306
 Source Schema         : yixing_auction

 Target Server Type    : MySQL
 Target Server Version : 50716
 File Encoding         : 65001

 Date: 19/04/2023 08:57:56
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for auction_booth
-- ----------------------------
DROP TABLE IF EXISTS `auction_booth`;
CREATE TABLE `auction_booth`  (
  `number` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '编号(KW001)',
  `boothname` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '展位名称',
  `boothaddress` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '位置说明',
  `boothsize` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '尺寸(cm)',
  `boothvolume` int(11) NULL DEFAULT NULL COMMENT '展格数',
  `createdat` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `updatedat` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `status` int(4) UNSIGNED NOT NULL DEFAULT 0 COMMENT '行状态默认0正常,2是删除',
  `createid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人id',
  `updateid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人id',
  `islocking` int(4) NULL DEFAULT 0 COMMENT '是否锁定展位,0未锁定/解除待拍卖状态,1.锁定原因已经选为待拍卖,2中标展位,要小心处理',
  PRIMARY KEY (`number`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '展位管理数据' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for auction_booth_product
-- ----------------------------
DROP TABLE IF EXISTS `auction_booth_product`;
CREATE TABLE `auction_booth_product`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `boothnum` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '展位编号(KW001)',
  `productid` bigint(20) NOT NULL COMMENT '藏品表id',
  `productnum` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '藏品编号',
  `productname` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '藏品名称',
  `productbrand` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '藏品品牌',
  `productsize` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '藏品尺寸(cm)',
  `productspecifications` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '藏品规格',
  `productunit` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '藏品单位',
  `productprice` double NULL DEFAULT NULL COMMENT '参考单价(元)',
  `inoutnum` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '入库单编号(RK22121500001)',
  `personwinnumber` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '中标订单号',
  `incount` int(11) NOT NULL COMMENT '入库数量',
  `createdat` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `status` int(4) UNSIGNED NOT NULL DEFAULT 0 COMMENT '行状态默认0正常',
  `createid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 48 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '展位和藏品关系管理' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for auction_current_quan (潘毅建的表)
-- ----------------------------
DROP TABLE IF EXISTS `auction_current_quan`;
CREATE TABLE `auction_current_quan`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类型 1-入库  2-出库',
  `current_date_no` date NULL DEFAULT NULL COMMENT '当前时间',
  `quan` int(11) NULL DEFAULT NULL COMMENT '当天的数据',
  `created_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `created_at` datetime NULL DEFAULT NULL,
  `updated_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `updated_at` datetime NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 31 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for auction_father_inout_log
-- ----------------------------
DROP TABLE IF EXISTS `auction_father_inout_log`;
CREATE TABLE `auction_father_inout_log`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `fathernum` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '出入库母单编号(RK2303020001)(母单编号)',
  `supplierid` int(11) NOT NULL COMMENT '供应商id',
  `createdat` datetime NOT NULL COMMENT '创建时间',
  `status` int(4) UNSIGNED NOT NULL DEFAULT 0 COMMENT '行状态默认0正常,1删除,2第一次新建,还没有子单信息',
  `createid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '创建人id(操作人的意思)',
  `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '入库说明',
  `backtoperson` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '退货的收货人(也可以是入货人)',
  `remark2` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注2',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `fathernum`(`fathernum`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 175 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '出入库台账(母单)' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for auction_inout_log
-- ----------------------------
DROP TABLE IF EXISTS `auction_inout_log`;
CREATE TABLE `auction_inout_log`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `fathernum` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '出入库母单编号(RK2303020001)(母单编号)',
  `number` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '出入库单编号(RK2303020001KW002)(子单编号)',
  `personwinnumber` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '中标订单号',
  `supplierid` int(11) NOT NULL COMMENT '供应商id',
  `productid` bigint(20) NOT NULL COMMENT '藏品表id',
  `productnum` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '藏品编号',
  `productname` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '藏品名称',
  `productbrand` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '藏品品牌',
  `productsize` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '藏品尺寸(cm)',
  `productspecifications` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '藏品规格',
  `productunit` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '藏品单位',
  `inouttype` int(4) NOT NULL COMMENT '进出库类型新品入库1,移库入库2,盘点调整入库3,提货出库-1,入库单退货-2,移库出库-3,盘点调整出库-4,其他出库-5',
  `inoutcount` int(11) NULL DEFAULT NULL COMMENT '进出库数量',
  `outprocess` int(1) NULL DEFAULT NULL COMMENT '出库过程(1单个出库/2整架出库)',
  `boothnum` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '展位编号',
  `createdat` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `status` int(4) UNSIGNED NOT NULL DEFAULT 0 COMMENT '行状态默认0正常',
  `createid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人id(操作人的意思)',
  `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '原因说明',
  `relationnumber` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关联单号',
  `backtoperson` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '退货的收货人',
  `remark2` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注2,每个入库藏品的唯一标识(相同的藏品编号也有不同的入库标识),用来串联该藏品所有的流转记录了',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `number`(`number`) USING BTREE,
  INDEX `createdat`(`createdat`) USING BTREE,
  INDEX `remark2`(`remark2`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 102 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '出入库台账(子单)' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for auction_operation
-- ----------------------------
DROP TABLE IF EXISTS `auction_operation`;
CREATE TABLE `auction_operation`  (
  `number` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '拍卖场次(20221111-04)',
  `addressdetail` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '拍卖详细地址(20221115-001)',
  `starttime` datetime NOT NULL COMMENT '开始时间',
  `endtime` datetime NULL DEFAULT NULL COMMENT '结束时间',
  `hostname` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '主持人名称',
  `biddinground` int(4) NULL DEFAULT NULL COMMENT '竞拍轮次',
  `winround` int(4) NULL DEFAULT NULL COMMENT '中标轮次',
  `status` int(4) NULL DEFAULT 0 COMMENT '拍卖状态默认0是待开始或者进行中,1为结束拍卖,2删除',
  `createid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人id',
  `createdat` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `deposits` double NULL DEFAULT NULL COMMENT '保证金(元)',
  `updatedat` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `updateid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人id',
  PRIMARY KEY (`number`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '竞拍场次管理' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for auction_operation_round
-- ----------------------------
DROP TABLE IF EXISTS `auction_operation_round`;
CREATE TABLE `auction_operation_round`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '竞拍轮次主键',
  `operationnum` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '拍卖场次编号',
  `biddingroundid` int(4) NULL DEFAULT NULL COMMENT '竞拍轮次(后期要用,又启用了)',
  `biddingcount` int(4) NULL DEFAULT NULL COMMENT '标的数量',
  `result` int(4) NULL DEFAULT NULL COMMENT '拍卖结果null没有结果,1中标,2流拍,3中标后违约',
  `unsoldreason` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '流拍原因',
  `winername` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '中标人姓名',
  `winercard` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '中标人身份证号',
  `winerid` bigint(20) NULL DEFAULT NULL COMMENT '中标人id',
  `winamount` double(12, 2) NULL DEFAULT NULL COMMENT '中标金额(元)',
  `commissionrate` double(8, 6) NULL DEFAULT NULL COMMENT '设置佣金比例',
  `commission` double(12, 2) NULL DEFAULT NULL COMMENT '佣金',
  `personwinnumber` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '参拍人中标后订单编号',
  `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  `createdat` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `updatedat` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `status` int(4) NOT NULL DEFAULT 0 COMMENT '状态默认0正常',
  `createid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人id',
  `updateid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人id',
  `boothnumber` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '展位编号(KW001)',
  `startingprice` double(10, 2) NULL DEFAULT NULL COMMENT '起拍价格,单位元',
  `pictureaddress` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '群像照片地址',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `personwinnumber`(`personwinnumber`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 44 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '竞拍场拍卖轮次管理表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for auction_operation_round_product
-- ----------------------------
DROP TABLE IF EXISTS `auction_operation_round_product`;
CREATE TABLE `auction_operation_round_product`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `auction_operation_roundid` bigint(20) NOT NULL COMMENT '竞拍轮次id(发现没有意义,不做处理)',
  `operationnum` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '竞拍场次编号',
  `biddingroundid` int(4) NOT NULL COMMENT '竞拍轮次',
  `productid` bigint(20) NOT NULL COMMENT '藏品表id',
  `productnum` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '藏品编号',
  `productname` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '藏品名称',
  `productbrand` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '藏品品牌',
  `productsize` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '藏品尺寸(cm)',
  `productspecifications` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '藏品规格',
  `productunit` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '藏品单位',
  `productprice` double NULL DEFAULT NULL COMMENT '参考单价(元)',
  `inoutnum` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '入库单编号(RK22121500001)',
  `incount` int(11) NOT NULL COMMENT '入库数量',
  `createdat` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `status` int(4) UNSIGNED NOT NULL DEFAULT 0 COMMENT '状态默认0正常',
  `createid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 119 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '竞拍场拍卖轮次藏品管理表(藏品数据从auction_booth_product表中获取)' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for auction_person
-- ----------------------------
DROP TABLE IF EXISTS `auction_person`;
CREATE TABLE `auction_person` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `personname` varchar(128) DEFAULT NULL COMMENT '姓名/公司名称',
  `personcard` varchar(128) DEFAULT NULL COMMENT '身份证号/信用代码',
  `personphone` varchar(64) DEFAULT NULL COMMENT '手机号/联系电话',
  `contacts` varchar(128) DEFAULT NULL COMMENT '公司联系人姓名',
  `createdat` datetime DEFAULT NULL COMMENT '创建时间',
  `updatedat` datetime DEFAULT NULL COMMENT '修改时间',
  `status` int(4) unsigned NOT NULL DEFAULT '0' COMMENT '行状态默认0正常',
  `createid` varchar(50) DEFAULT NULL COMMENT '创建人id',
  `updateid` varchar(50) DEFAULT NULL COMMENT '修改人id',
  `iscompany` varchar(2) DEFAULT NULL COMMENT '0不是公司1是公司',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COMMENT='参拍人员信息表';




-- ----------------------------
-- Table structure for auction_person_join_log
-- ----------------------------
DROP TABLE IF EXISTS `auction_person_join_log`;
CREATE TABLE `auction_person_join_log` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `persionid` bigint(20) DEFAULT NULL COMMENT '参拍人员id',
  `personname` varchar(64) DEFAULT NULL COMMENT '参拍人姓名',
  `personcard` varchar(255) DEFAULT NULL COMMENT '参拍人身份证号码',
  `personphone` varchar(64) DEFAULT NULL COMMENT '手机号',
  `operationnum` varchar(16) DEFAULT NULL COMMENT '拍卖场次编号',
  `deposits` double DEFAULT NULL COMMENT '保证金(元)',
  `joinpictureaddress` text COMMENT '上传凭证照片地址',
  `depositstype` int(4) DEFAULT NULL COMMENT '保证金支付方式1线上支付,2现金,3刷卡',
  `depositsnum` varchar(128) DEFAULT NULL COMMENT '保证金支付流水号(微信为订单号p123456)',
  `depositscardnum` varchar(128) DEFAULT NULL COMMENT '保证金支付账号',
  `depositsmoney` double DEFAULT NULL COMMENT '保证金支付金额(元)',
  `depositsdat` datetime DEFAULT NULL COMMENT '保证金支付时',
  `createdat` datetime DEFAULT NULL COMMENT '创建时间',
  `personwinlogcount` int(4) DEFAULT NULL COMMENT '中标次数',
  `ispay` int(2) DEFAULT NULL COMMENT '中标支付数量:状态:0未支付1已支付1次中标金额,2支付两次中标金额(可以关联中标支付表,不一定要用)',
  `isreturndeposits` int(2) DEFAULT NULL COMMENT '保证金状态:0滞压保证金1已经退还保证金,2待退保证金,3罚没保证金',
  `starttimereturndeposits` datetime DEFAULT NULL COMMENT '开始退还保证金的时间',
  `isreturndepositstype` int(2) DEFAULT NULL COMMENT '保证金退还最终状态:1罚没,2退款',
  `usedepositsmoney` double DEFAULT NULL COMMENT '退款或罚没的金额',
  `usetime` datetime DEFAULT NULL COMMENT '退款或罚没的执行时间',
  `usepassername` varchar(255) DEFAULT NULL COMMENT '退款或罚没经手人姓名',
  `iscompany` varchar(2) DEFAULT NULL COMMENT '0不是公司1是公司',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注(滞压,罚没的说明)',
  `updatedat` datetime DEFAULT NULL COMMENT '修改时间',
  `status` int(4) NOT NULL DEFAULT '0' COMMENT '状态默认0正常',
  `createid` varchar(50) DEFAULT NULL COMMENT '创建人id',
  `updateid` varchar(50) DEFAULT NULL COMMENT '修改人id',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `isreturndeposits` (`isreturndeposits`),
  KEY `starttimereturndeposits` (`starttimereturndeposits`),
  KEY `personcard` (`personcard`),
  KEY `operationnum` (`operationnum`)
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8 COMMENT='参拍人员参拍记录表';

-- ----------------------------
-- Table structure for auction_person_join_picture
-- ----------------------------
DROP TABLE IF EXISTS `auction_person_join_picture`;
CREATE TABLE `auction_person_join_picture` (
  `id` varchar(255) NOT NULL,
  `personjoinid` bigint(20) DEFAULT NULL COMMENT '参拍人员参拍记录表id',
  `file_name` varchar(255) DEFAULT NULL COMMENT '文件名',
  `file_path` varchar(255) DEFAULT NULL COMMENT '文件路径',
  `file_type` varchar(255) DEFAULT NULL COMMENT '文件类型',
  `file_content_type` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `status` int(2) DEFAULT '0' COMMENT '0正常,2删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='参拍人员参拍记录一对多数据(用户进行退款/罚没时的保存图片)';

-- ----------------------------
-- Table structure for auction_person_win_log
-- ----------------------------
DROP TABLE IF EXISTS `auction_person_win_log`;
CREATE TABLE `auction_person_win_log` (
  `number` varchar(32) NOT NULL COMMENT '订单编号',
  `personjoinid` bigint(20) NOT NULL COMMENT '参拍记录表id',
  `operationroundid` bigint(20) NOT NULL COMMENT '竞拍场拍卖轮次id',
  `operationnum` varchar(16) DEFAULT NULL COMMENT '拍卖场次编号',
  `starttime` datetime DEFAULT NULL COMMENT '开始时间(因为结束时间是和拍卖场次相关,所以到对应表找)',
  `endtime` datetime DEFAULT NULL COMMENT '结束时间(因为结束时间是和拍卖场次相关,所以到对应表找)',
  `personname` varchar(64) DEFAULT NULL COMMENT '参拍人姓名',
  `personcard` varchar(64) DEFAULT NULL COMMENT '参拍人身份证号码',
  `personphone` varchar(64) DEFAULT NULL COMMENT '参拍人手机号',
  `winamount` double(12,2) DEFAULT NULL COMMENT '中标金额(元)',
  `commission` double(12,2) DEFAULT NULL COMMENT '佣金',
  `ispay` int(2) DEFAULT NULL COMMENT '0未支付1已支付中标金额',
  `paytime` datetime DEFAULT NULL COMMENT '支付时间',
  `paynumber` varchar(255) DEFAULT NULL COMMENT '支付流水号',
  `paytype` int(2) DEFAULT NULL COMMENT '支付方式1线上支付,2现金,3刷卡',
  `paycardnum` varchar(128) DEFAULT NULL COMMENT '金支付账号',
  `paymoney` double DEFAULT NULL COMMENT '支付金额(元)',
  `winpictureaddress` text COMMENT '上传凭证照片地址',
  `taketype` int(2) DEFAULT NULL COMMENT '提货状态1待提货,2已提货,3部分提货',
  `createdat` datetime DEFAULT NULL COMMENT '创建时间',
  `updatedat` datetime DEFAULT NULL COMMENT '修改时间',
  `status` int(4) unsigned NOT NULL DEFAULT '0' COMMENT '状态默认0正常',
  `createid` varchar(50) DEFAULT NULL COMMENT '创建人id',
  `updateid` varchar(50) DEFAULT NULL COMMENT '修改人id',
  PRIMARY KEY (`number`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='参拍人员中标支付记录表';

-- ----------------------------
-- Table structure for auction_product
-- ----------------------------
DROP TABLE IF EXISTS `auction_product`;
CREATE TABLE `auction_product`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `number` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '编号(cp22121500001)',
  `supplierid` int(11) NOT NULL COMMENT '供应商编号',
  `productname` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '藏品名称',
  `productbrand` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '藏品品牌',
  `productsize` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '藏品尺寸(cm)',
  `productspecifications` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '藏品规格',
  `productinfo` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '藏品简介',
  `productprice` double NULL DEFAULT NULL COMMENT '参考单价(元)',
  `productunit` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '藏品单位',
  `producturl` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '藏品图片',
  `createdat` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `updatedat` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `status` int(4) UNSIGNED NOT NULL DEFAULT 0 COMMENT '行状态默认0正常,1只保存,不发布,2删除',
  `createid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人id',
  `updateid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人id',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `number`(`number`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 46 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '藏品管理数据' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for auction_product_picture
-- ----------------------------
DROP TABLE IF EXISTS `auction_product_picture`;
CREATE TABLE `auction_product_picture`  (
  `id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `productid` bigint(20) NULL DEFAULT NULL COMMENT '藏品管理id',
  `file_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件名',
  `file_path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件路径',
  `file_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件类型',
  `file_content_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `created_at` datetime NULL DEFAULT NULL,
  `status` int(2) NULL DEFAULT 0 COMMENT '0正常,2删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '产品一对多数据' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for auction_supplier
-- ----------------------------
DROP TABLE IF EXISTS `auction_supplier`;
CREATE TABLE `auction_supplier`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '供应商名称',
  `phone` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '供应商联系电话',
  `address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '供应商地址',
  `createdat` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `updatedat` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `status` int(4) UNSIGNED NOT NULL DEFAULT 0 COMMENT '行状态默认0正常',
  `createid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人id',
  `updateid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人id',
  `havediscount` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '是否有优惠有,否',
  `contacts` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系人',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `name`(`name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 21 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '供应商数据' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;
