CREATE TABLE `lb_daily_user_trade` (
  `id`              CHAR(36)      NOT NULL COMMENT '表ID（UUID）',
  `tenant_id`       VARCHAR(64)   NOT NULL COMMENT '租户ID',
  `user_id`         VARCHAR(64)   NOT NULL COMMENT '用户ID',
  `nickname`        VARCHAR(100)  DEFAULT NULL COMMENT '昵称',
  `daily_sell_amt`  DECIMAL(18,2) NOT NULL DEFAULT 0.00 COMMENT '单日卖出金额',
  `daily_buy_amt`   DECIMAL(18,2) NOT NULL DEFAULT 0.00 COMMENT '当日买入金额',
  `diff_amt`        DECIMAL(18,2) NOT NULL DEFAULT 0.00 COMMENT '差额',
  `promoter_id`     VARCHAR(64)   DEFAULT NULL COMMENT '推广人ID',
  `promoter_name`   VARCHAR(100)  DEFAULT NULL COMMENT '推广人',
  `desc_content`    VARCHAR(512)  DEFAULT NULL COMMENT '描述',
  `created_at`      DATETIME      NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '插入时间',
  `updated_at`      DATETIME      NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`),
  KEY `idx_tenant_user` (`tenant_id`, `user_id`),
  KEY `idx_created_at` (`created_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='当天用户交易';
