CREATE TABLE IF NOT EXISTS robo_benchmark
(
    rb_id          BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
    rb_date        DATETIME        NOT NULL COMMENT '日期',
    rb_risk        VARCHAR(255)    NOT NULL COMMENT '风险等级',
    rb_nav         DOUBLE(16, 4)   NOT NULL COMMENT '资产值',
    rb_re          TINYINT         NOT NULL DEFAULT 0 COMMENT '是否再分配',
    rb_create_time DATETIME        NOT NULL DEFAULT CURRENT_TIMESTAMP,
    rb_update_time DATETIME                 DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (rb_id),
    UNIQUE INDEX (rb_date, rb_risk),
    INDEX (rb_risk)
) ENGINE = InnoDB
  AUTO_INCREMENT = 0
  DEFAULT CHARSET = utf8mb4 COMMENT 'BENCHMARK数据表';