DROP TABLE IF EXISTS `purchase_requisition_checked`;
CREATE TABLE `purchase_requisition_checked` (
	`id` BIGINT(32) NOT NULL AUTO_INCREMENT COMMENT 'ID，唯一编号',
	`sid` VARCHAR(64) NOT NULL COMMENT 'sid',
	`lockVersion` VARCHAR(2) NULL DEFAULT NULL COMMENT '记录版本，锁',
	`createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录创建时间',
	`modifyTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '记录最后修改时间',
	`state` INT(11) NOT NULL DEFAULT '1' COMMENT '记录状态值',
	`isEnable` INT(32) NOT NULL DEFAULT '1' COMMENT '记录是否可用，1:可用，0:不可用',
	`isDelete` INT(32) NOT NULL DEFAULT '0' COMMENT '记录是否被删除，0:未删除，1:已经删除',
	`remarks` VARCHAR(255) NULL DEFAULT NULL COMMENT '备注信息',
	`createBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者',
	`updateBySid` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者',
	
	`prSid` VARCHAR(100) NULL DEFAULT NULL COMMENT '订单SID',
	`prCode` VARCHAR(100) NULL DEFAULT NULL COMMENT '订单编号',
	`storeName` VARCHAR(100) NULL DEFAULT NULL COMMENT '仓库/门店名称',
	`receiptTime` DATETIME NULL DEFAULT NULL COMMENT '收货时间',
	`billNo` VARCHAR(100) NULL DEFAULT NULL COMMENT '单据号',
	`billType` VARCHAR(100) NULL DEFAULT NULL COMMENT '单据类型',
	
	PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB  COMMENT='采购订单检查结果';


DROP TABLE IF EXISTS `template_staff_config`;
CREATE TABLE `template_staff_config`  (
                                          `id` int(0) NOT NULL AUTO_INCREMENT,
                                          `sid` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
                                          `templateSid` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL COMMENT '模板sid',
                                          `staffSid` varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL COMMENT '员工sid',
                                          `lockVersion` int(0) NOT NULL DEFAULT 0 COMMENT '记录版本，锁',
                                          `createTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '记录创建时间',
                                          `modifyTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '记录最后修改时间',
                                          `isEnable` int(0) NOT NULL DEFAULT 1 COMMENT '记录是否可用，1:可用，0:不可用',
                                          `state` int(0) NULL DEFAULT 1 COMMENT '隐藏本部门:隐藏本部门开启后，本部门将不会显示在公司通讯录中',
                                          `isDelete` int(0) NULL DEFAULT NULL COMMENT '记录是否被删除，0:未删除，1:已经删除',
                                          `remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注信息',
                                          `createBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建者',
                                          `updateBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新者',
                                          PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_croatian_ci ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;


DROP TABLE IF EXISTS `wechat_template`;
CREATE TABLE `wechat_template`  (
                                    `id` int(0) NOT NULL,
                                    `sid` varchar(64) CHARACTER SET utf8 COLLATE utf8_croatian_ci NOT NULL,
                                    `templateId` varchar(100) CHARACTER SET utf8 COLLATE utf8_croatian_ci NOT NULL COMMENT '模板ID',
                                    `title` varchar(255) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL COMMENT '标题',
                                    `json` json NULL COMMENT 'json',
                                    `trade` varchar(255) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL COMMENT '行业',
                                    `lockVersion` int(0) NOT NULL DEFAULT 0 COMMENT '记录版本，锁',
                                    `createTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '记录创建时间',
                                    `modifyTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '记录最后修改时间',
                                    `isEnable` int(0) NOT NULL DEFAULT 1 COMMENT '记录是否可用，1:可用，0:不可用',
                                    `state` int(0) NULL DEFAULT 1 COMMENT '隐藏本部门:隐藏本部门开启后，本部门将不会显示在公司通讯录中',
                                    `isDelete` int(0) NULL DEFAULT NULL COMMENT '记录是否被删除，0:未删除，1:已经删除',
                                    `remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注信息',
                                    `createBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建者',
                                    `updateBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新者',
                                    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_croatian_ci COMMENT = '微信信息推送模版表' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;


DROP TABLE IF EXISTS `loan_bank_information`;
CREATE TABLE `loan_bank_information`  (
                                          `id` int(0) NOT NULL AUTO_INCREMENT,
                                          `sid` varchar(255) CHARACTER SET utf8 COLLATE utf8_croatian_ci NOT NULL COMMENT 'ids',
                                          `bankName` varchar(100) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL COMMENT '银行名称',
                                          `bankAbbreviation` varchar(100) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL COMMENT '银行简称',
                                          `address` varchar(100) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL COMMENT '地址',
                                          `province` varchar(100) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL COMMENT '省',
                                          `city` varchar(100) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL COMMENT '市',
                                          `county` varchar(100) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL COMMENT '区',
                                          `contacts` varchar(100) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL COMMENT '联系人',
                                          `telephone` varchar(100) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL COMMENT '电话',
                                          `pSid` varchar(255) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT '0' COMMENT '上级sid',
                                          `lockVersion` int(0) NULL DEFAULT 0 COMMENT '版本锁',
                                          `createTime` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
                                          `modifyTime` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '修改时间',
                                          `isEnable` int(0) NULL DEFAULT 1 COMMENT '是否可用：1可用，0不可用',
                                          `state` int(0) NULL DEFAULT 1 COMMENT '状态',
                                          `isDelete` int(0) NULL DEFAULT 0 COMMENT '是否删除：0未删除，1已删除',
                                          `remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
                                          `createBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人sid',
                                          `updateBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人sid',
                                          PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_croatian_ci COMMENT = '贷款银行信息' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;


DROP TABLE IF EXISTS `bank_manager`;
CREATE TABLE `bank_manager`  (
                                 `id` int(0) NOT NULL AUTO_INCREMENT,
                                 `sid` varchar(255) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL,
                                 `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL COMMENT '姓名',
                                 `telephone` varchar(100) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL COMMENT '电话',
                                 `post` varchar(100) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL COMMENT '职务',
                                 `bankSid` varchar(255) CHARACTER SET utf8 COLLATE utf8_croatian_ci NULL DEFAULT NULL COMMENT '银行sid',
                                 `lockVersion` int(0) NULL DEFAULT 0 COMMENT '版本锁',
                                 `createTime` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
                                 `modifyTime` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '修改时间',
                                 `isEnable` int(0) NULL DEFAULT 1 COMMENT '是否可用：1可用，0不可用',
                                 `state` int(0) NULL DEFAULT 1 COMMENT '状态',
                                 `isDelete` int(0) NULL DEFAULT 0 COMMENT '是否删除：0未删除，1已删除',
                                 `remarks` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
                                 `createBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人sid',
                                 `updateBySid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人sid',
                                 PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_croatian_ci COMMENT = '银行负责人信息' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;
