USE hnqzx;

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for single_member_settle_same_amount_in_several_months
-- ----------------------------
DROP TABLE IF EXISTS `single_member_settle_same_amount_in_several_months`;
CREATE TABLE `single_member_settle_same_amount_in_several_months`
(
    `record_id`               INT UNSIGNED AUTO_INCREMENT COMMENT 'id',
    `note_id`                 INT UNSIGNED NOT NULL COMMENT '积分包计算记录id',
    `realname`                VARCHAR(32)  NOT NULL COMMENT '用户名称',
    `username`                VARCHAR(11)  NOT NULL COMMENT '用户名',
    `dept_id`                 INT          NOT NULL COMMENT '结算企业id',
    `dept_name`               VARCHAR(64)  NOT NULL COMMENT '结算企业名称',
    `settle_amount`           DECIMAL      NOT NULL COMMENT '结算金额',
    `sub_to_gig_time`         DATETIME     NULL COMMENT '结算时间',
    `settle_state`            VARCHAR(16)  NOT NULL COMMENT '结算企业名称',
    `sub_type_name`           VARCHAR(16)  NOT NULL COMMENT '结算渠道名称',
    `package_name`            VARCHAR(64)  NOT NULL COMMENT '积分包名称',
    `settle_note_create_time` DATETIME     NOT NULL COMMENT '结算记录创建时间',
    `period`                  INT UNSIGNED NOT NULL COMMENT '统计周期',
    `create_time`            DATETIME     NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
    PRIMARY KEY (`record_id`) USING BTREE
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4 COMMENT ='单人连续多月结算相同金额';


SET FOREIGN_KEY_CHECKS = 1;