123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830 |
- CREATE TABLE `admin_user` (
- `admin_user_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '管理员编号',
- `username` varchar(32) NOT NULL COMMENT '登录昵称',
- `head_img` varchar(256) DEFAULT NULL COMMENT '用户头像',
- `passwd` varchar(64) NOT NULL COMMENT '登录密码',
- `phone` varchar(11) DEFAULT NULL COMMENT '手机号码',
- `email` varchar(32) DEFAULT NULL COMMENT '邮件地址',
- `memo` varchar(512) DEFAULT NULL COMMENT '备注信息',
- `state` tinyint(4) NOT NULL DEFAULT 1 COMMENT '有效状态,见ValidStateEnum',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`admin_user_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=100001 DEFAULT CHARSET=utf8mb4 COMMENT='管理员信息表';
- CREATE TABLE `admin_user_role` (
- `admin_user_role_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '管理员角色编号',
- `admin_user_id` bigint(20) unsigned NOT NULL COMMENT '管理员编号',
- `admin_role_id` bigint(20) unsigned NOT NULL COMMENT '角色编号',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`admin_user_role_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=10000001 DEFAULT CHARSET=utf8mb4 COMMENT='管理员角色信息表';
- CREATE TABLE `admin_role` (
- `admin_role_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '管理员角色编号',
- `name` varchar(32) NOT NULL COMMENT '角色名称',
- `memo` varchar(512) DEFAULT NULL COMMENT '备注信息',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`admin_role_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=100001 DEFAULT CHARSET=utf8mb4 COMMENT='角色信息表';
- CREATE TABLE `admin_role_permission` (
- `admin_role_permission_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '角色权限编号',
- `admin_role_id` bigint(20) unsigned NOT NULL COMMENT '角色编号',
- `admin_permission_id` bigint(20) unsigned NOT NULL COMMENT '权限编号',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`admin_role_permission_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=10000001 DEFAULT CHARSET=utf8mb4 COMMENT='角色权限信息表';
- CREATE TABLE `admin_permission` (
- `admin_permission_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '权限编号',
- `parent_admin_permission_id` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '父权限编号',
- `type` tinyint(4) NOT NULL DEFAULT 1 COMMENT '权限类型,见PermissionTypeEnum',
- `code` varchar(64) NOT NULL COMMENT '权限编码',
- `name` varchar(32) NOT NULL COMMENT '权限名称',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`admin_permission_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=100001 DEFAULT CHARSET=utf8mb4 COMMENT='权限信息表';
- CREATE TABLE `admin_user_login` (
- `admin_login_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '登录编号',
- `admin_user_id` bigint(20) unsigned NOT NULL COMMENT '管理员编号',
- `user_agent` varchar(512) DEFAULT NULL COMMENT '客户端',
- `area` varchar(64) DEFAULT NULL COMMENT '城市',
- `ip` int(11) DEFAULT 0 COMMENT 'IP地址',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`admin_login_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=10000001 DEFAULT CHARSET=utf8mb4 COMMENT='管理员登录信息表';
- CREATE TABLE `user` (
- `user_id` bigint(20) unsigned NOT NULL COMMENT '用户编号',
- `phone` varchar(11) DEFAULT NULL COMMENT '用户手机号',
- `nick_name` varchar(32) NOT NULL COMMENT '用户昵称',
- `head_img` varchar(256) DEFAULT NULL COMMENT '用户头像',
- `gender` tinyint(4) NOT NULL COMMENT '用户性别',
- `birth_date` varchar(10) DEFAULT NULL COMMENT '用户生日',
- `city_id` int(11) NOT NULL DEFAULT 0 COMMENT '用户居住城市',
- `native_city_id` int(11) NOT NULL DEFAULT 0 COMMENT '用户家乡城市',
- `height` double UNSIGNED NOT NULL DEFAULT 0 COMMENT '身高',
- `weight` double UNSIGNED NOT NULL DEFAULT 0 COMMENT '体重',
- `education` tinyint(4) NOT NULL DEFAULT 0 COMMENT '学历',
- `occupation` varchar(32) DEFAULT NULL COMMENT '职业',
- `introduce` varchar(512) DEFAULT NULL COMMENT '自我介绍',
- `family` varchar(512) DEFAULT NULL COMMENT '家庭情况',
- `half` varchar(512) DEFAULT NULL COMMENT '选偶条件',
- `realname_state` tinyint(4) NOT NULL DEFAULT 1 COMMENT '实人认证状态,见RealnameStateEnum',
- `im_token` varchar(128) DEFAULT NULL comment '第三方IM长连接token',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`user_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户信息表';
- CREATE TABLE `user_image` (
- `image_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '个人形象编号',
- `user_id` bigint(20) unsigned NOT NULL COMMENT '用户编号',
- `image_url` varchar(256) NOT NULL COMMENT '图片地址',
- `audit_state` tinyint(4) unsigned NOT NULL COMMENT '审核状态',
- `audit_desc` VARCHAR(64) DEFAULT NULL COMMENT '审核描述',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`image_id`),
- KEY (`user_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='用户个人形象表';
- CREATE TABLE `user_interest` (
- `interest_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '个性兴趣编号',
- `user_id` bigint(20) unsigned NOT NULL COMMENT '用户编号',
- `interest_tag_id` bigint(20) unsigned NOT NULL COMMENT '个性标签',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`interest_id`),
- KEY (`user_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='用户个性标签表';
- CREATE TABLE `user_friend` (
- `friend_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '好友编号',
- `user_id` bigint(20) unsigned NOT NULL COMMENT '用户编号',
- `friend_user_id` bigint(20) unsigned NOT NULL COMMENT '好友用户编号',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- PRIMARY KEY (`friend_id`),
- UNIQUE KEY (`user_id`, `friend_user_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='用户好友表';
- CREATE TABLE `user_follow` (
- `follow_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '关注编号',
- `user_id` bigint(20) unsigned NOT NULL COMMENT '用户编号',
- `follow_user_id` bigint(20) unsigned NOT NULL COMMENT '关注用户编号',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- PRIMARY KEY (`follow_id`),
- UNIQUE KEY (`user_id`, `follow_user_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='用户关注表';
- CREATE TABLE `user_visit` (
- `visit_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '访问编号',
- `user_id` bigint(20) unsigned NOT NULL COMMENT '用户编号',
- `visit_user_id` bigint(20) unsigned NOT NULL COMMENT '访问用户编号',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- PRIMARY KEY (`visit_id`),
- KEY (`visit_user_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='用户访问表';
- CREATE TABLE `user_realname` (
- `realname_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '实人认证编号',
- `user_id` bigint(20) unsigned NOT NULL COMMENT '用户编号',
- `real_name` varchar(16) NOT NULL COMMENT '真实姓名',
- `id_card` varchar(18) NOT NULL COMMENT '身份证号',
- `img_url` varchar(256) NOT NULL COMMENT '图片地址',
- `result` tinyint(4) DEFAULT NULL COMMENT '认证结果,见RealnameResultEnum',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- PRIMARY KEY (`realname_id`),
- KEY (`user_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='用户实人认证表';
- CREATE TABLE `purse_account` (
- `user_id` bigint(20) unsigned NOT NULL COMMENT '用户编号',
- `bean` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '红豆数量',
- `sugar` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '糖数量',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`user_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='钱包账户表';
- CREATE TABLE `purse_recharge` (
- `recharge_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '充值编号',
- `user_id` bigint(20) unsigned NOT NULL COMMENT '用户编号',
- `product_id` bigint(20) unsigned NOT NULL COMMENT '充值产品编号',
- `fee` bigint(20) unsigned NOT NULL COMMENT '充值金额',
- `bean` bigint(20) unsigned NOT NULL COMMENT '红豆数量',
- `first_bean` bigint(20) unsigned NOT NULL COMMENT '首充赠送红豆数量',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`recharge_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='钱包充值表';
- CREATE TABLE `purse_recharge_product` (
- `product_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '充值产品编号',
- `apple_product_id` varchar(128) DEFAULT NULL COMMENT '充值苹果产品',
- `fee` bigint(20) unsigned NOT NULL COMMENT '产品金额',
- `bean` bigint(20) unsigned NOT NULL COMMENT '产品红豆数量',
- `first_bean` bigint(20) unsigned NOT NULL COMMENT '产品首充赠送红豆数量',
- `sort_flag` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '排序标识(降序)',
- `group` tinyint(4) unsigned NOT NULL COMMENT '产品分组',
- `state` tinyint(4) unsigned NOT NULL COMMENT '产品状态',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`product_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1001 DEFAULT CHARSET=utf8mb4 COMMENT='钱包充值产品表';
- CREATE TABLE `purse_withdraw` (
- `withdraw_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '提现编号',
- `user_id` bigint(20) unsigned NOT NULL COMMENT '用户编号',
- `fee` bigint(20) unsigned NOT NULL COMMENT '提现金额',
- `sugar` bigint(20) unsigned NOT NULL COMMENT '消耗糖数量',
- `identity_id` bigint(20) unsigned NOT NULL COMMENT '提现账户编号',
- `state` tinyint(4) unsigned NOT NULL COMMENT '提现状态',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`withdraw_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='钱包提现表';
- CREATE TABLE `purse_withdraw_identity` (
- `identity_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '提现身份编号',
- `user_id` bigint(20) unsigned NOT NULL COMMENT '用户编号',
- `type` tinyint(4) unsigned NOT NULL COMMENT '提现身份类型',
- `identity` VARCHAR(1024) NOT NULL COMMENT '提现身份',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`identity_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='钱包提现身份表';
- CREATE TABLE `transaction` (
- `transaction_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '交易编号',
- `type` tinyint(4) unsigned NOT NULL COMMENT '交易类型',
- `out_id` bigint(20) unsigned NOT NULL COMMENT '外部业务编号',
- `original_transaction_id` bigint(20) unsigned DEFAULT 0 COMMENT '原来交易编号',
- `kind` tinyint(4) unsigned NOT NULL COMMENT '交易分类',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`transaction_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='钱包交易表';
- CREATE TABLE `transaction_item` (
- `transaction_item_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '交易项编号',
- `transaction_id` bigint(20) unsigned NOT NULL COMMENT '交易编号',
- `sub_type` tinyint(4) unsigned NOT NULL COMMENT '交易子分类',
- `user_id` bigint(20) unsigned NOT NULL COMMENT '用户编号',
- `bean` bigint(20) NOT NULL COMMENT '红豆数量变化',
- `sugar` bigint(20) NOT NULL COMMENT '糖数量变化',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`transaction_item_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='钱包交易项表';
- CREATE TABLE `question` (
- `question_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '问题编号',
- `question_user_id` bigint(20) unsigned NOT NULL COMMENT '提问用户编号',
- `question` VARCHAR(256) NOT NULL COMMENT '提问内容',
- `question_time` DATETIME NOT NULL COMMENT '提问时间',
- `question_bean` bigint(20) unsigned NOT NULL COMMENT '提问消耗红豆数量',
- `watch_bean` bigint(20) unsigned NOT NULL COMMENT '围观消耗红豆数量',
- `question_audit_state` tinyint(4) unsigned NOT NULL COMMENT '提问审核状态',
- `question_audit_desc` VARCHAR(64) DEFAULT NULL COMMENT '提问审核描述',
- `answer_user_id` bigint(20) unsigned NOT NULL COMMENT '回答用户编号',
- `answer` VARCHAR(256) DEFAULT NULL COMMENT '回答内容',
- `answer_time` DATETIME DEFAULT NULL COMMENT '回答时间',
- `answer_audit_state` tinyint(4) unsigned NOT NULL COMMENT '回答审核状态',
- `answer_audit_desc` VARCHAR(64) DEFAULT NULL COMMENT '回答审核描述',
- `state` tinyint(4) unsigned NOT NULL COMMENT '问题状态',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`question_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='问题表';
- CREATE TABLE `question_watch` (
- `question_watch_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '问题围观编号',
- `watch_user_id` bigint(20) unsigned NOT NULL COMMENT '围观用户编号',
- `question_id` bigint(20) unsigned NOT NULL COMMENT '问题编号',
- `watch_bean` bigint(20) unsigned NOT NULL COMMENT '围观消耗红豆数量',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`question_watch_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='问题围观表';
- CREATE TABLE `trade_order` (
- `order_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '订单编号',
- `order_no` VARCHAR(32) NOT NULL COMMENT '订单号',
- `user_id` bigint(20) unsigned NOT NULL COMMENT '用户编号',
- `device_no` varchar(64) NOT NULL COMMENT '设备唯一码',
- `type` tinyint(4) unsigned NOT NULL COMMENT '订单类型',
- `out_id` bigint(20) unsigned NOT NULL COMMENT '外部业务编号',
- `total_fee` bigint(20) unsigned NOT NULL COMMENT '订单金额',
- `pay_type` tinyint(4) DEFAULT NULL COMMENT '支付类型',
- `pay_fee` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '支付金额',
- `pay_no` VARCHAR(64) DEFAULT NULL COMMENT '支付号',
- `pay_time` DATETIME DEFAULT NULL COMMENT '支付时间',
- `state` tinyint(4) unsigned NOT NULL COMMENT '订单状态',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`order_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='订单表';
- CREATE TABLE `moment` (
- `moment_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '动态编号',
- `user_id` bigint(20) unsigned NOT NULL COMMENT '用户编号',
- `type` tinyint(4) unsigned NOT NULL COMMENT '动态类型,MomentTypeEnum',
- `title` varchar(1024) DEFAULT NULL COMMENT '动态描述',
- `content` varchar(2048) DEFAULT NULL COMMENT '动态内容',
- `visible` tinyint(4) unsigned NOT NULL DEFAULT 1 COMMENT '动态类型,MomentVisibleEnum',
- `tag` tinyint(4) unsigned NOT NULL COMMENT '动态标签,MomentTagEnum',
- `topic` varchar(128) DEFAULT NULL COMMENT '动态话题(多个用逗号分隔)',
- `audit_state` tinyint(4) unsigned NOT NULL COMMENT '审核状态,AuditStateEnum',
- `audit_memo` varchar(128) DEFAULT NULL COMMENT '审核备注',
- `audit_admin_id` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '审核管理员编号',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`moment_id`),
- KEY(`user_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='用户个人动态表';
- CREATE TABLE `moment_comment` (
- `comment_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '点赞编号',
- `user_id` bigint(20) unsigned NOT NULL COMMENT '用户编号',
- `at_comment_id` bigint(20) unsigned NOT NULL COMMENT '回复评论编号',
- `at_user_id` bigint(20) unsigned NOT NULL COMMENT '回复用户编号',
- `moment_id` bigint(20) unsigned NOT NULL COMMENT '动态编号',
- `comment` varchar(512) NOT NULL COMMENT '评论内容',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`comment_id`),
- KEY(`moment_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='用户个人动态评论表';
- CREATE TABLE `moment_like` (
- `like_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '点赞编号',
- `like_user_id` bigint(20) unsigned NOT NULL COMMENT '点赞用户编号',
- `moment_id` bigint(20) unsigned NOT NULL COMMENT '动态编号',
- `comment_id` bigint(20) unsigned NOT NULL COMMENT '评论编号',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- PRIMARY KEY (`like_id`),
- KEY(`like_user_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='用户个人动态点赞表';
- CREATE TABLE `moment_share` (
- `share_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '分享编号',
- `device_no` varchar(64) NOT NULL COMMENT '客户端生成唯一码',
- `share_user_id` bigint(20) unsigned NOT NULL COMMENT '分享用户编号',
- `moment_id` bigint(20) unsigned NOT NULL COMMENT '动态编号',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- PRIMARY KEY (`share_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='用户个人动态分享表';
- CREATE TABLE `moment_user_pay` (
- `pay_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '付费编号',
- `pay_user_id` bigint(20) unsigned NOT NULL COMMENT '付费用户编号',
- `moment_user_id` bigint(20) unsigned NOT NULL COMMENT '动态用户编号',
- `pay_bean` bigint(20) unsigned NOT NULL COMMENT '查看动态消耗红豆数量',
- `begin_time` DATETIME NOT NULL COMMENT '生效开始时间',
- `end_time` DATETIME NOT NULL COMMENT '生效截止时间',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- PRIMARY KEY (`pay_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='用户个人动态付费表';
- CREATE TABLE `cp_match` (
- `match_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'CP配对编号',
- `type` tinyint(4) unsigned NOT NULL DEFAULT 1 COMMENT '配对类型,CpMatchTypeEnum',
- `user_id` bigint(20) unsigned NOT NULL COMMENT '发起配对用户编号',
- `match_user_id` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '选择配对用户编号',
- `begin_time` DATETIME NOT NULL COMMENT '开始时间',
- `state` tinyint(4) unsigned NOT NULL COMMENT '配对状态,CpStateEnum',
- `room_id` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '分配配对房间编号',
- `result` tinyint(4) unsigned NOT NULL COMMENT '配对结果,CpResultEnum',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`match_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='CP配对表';
- CREATE TABLE `cp_match_candidate` (
- `match_candidate_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'CP配对报名编号',
- `match_id` bigint(20) unsigned NOT NULL COMMENT 'CP配对编号',
- `user_id` bigint(20) unsigned NOT NULL COMMENT '报名用户编号',
- `gift_id` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '赠送礼物编号',
- `bean` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '赠送消耗红豆数量',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`match_candidate_id`),
- UNIQUE KEY `uk_match_user`(`match_id`, `user_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='CP配对报名表';
- CREATE TABLE `gift` (
- `gift_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '礼物编号',
- `name` varchar(16) NOT NULL COMMENT '礼物名称',
- `img` varchar(256) NOT NULL COMMENT '礼物图片',
- `cartoon` varchar(256) DEFAULT NULL COMMENT '礼物动画',
- `bean` bigint(20) unsigned NOT NULL COMMENT '礼物对等红豆数量',
- `sort_flag` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '排序标识(降序)',
- `type` tinyint(4) unsigned NOT NULL COMMENT '礼物类型,见GiftTypeEnum',
- `state` tinyint(4) unsigned NOT NULL COMMENT '礼物状态,见GiftStateEnum',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`gift_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1001 DEFAULT CHARSET=utf8mb4 COMMENT='礼物表';
- CREATE TABLE `gift_send` (
- `gift_send_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '礼物赠送编号',
- `send_user_id` bigint(20) unsigned NOT NULL COMMENT '送礼物用户编号',
- `receive_user_id` bigint(20) unsigned NOT NULL COMMENT '收礼物用户编号',
- `gift_id` bigint(20) unsigned NOT NULL COMMENT '礼物编号',
- `out_type` tinyint(4) unsigned NOT NULL COMMENT '关联送礼物业务类型, 见GiftOutTypeEnum',
- `out_id` bigint(20) unsigned NOT NULL COMMENT '关联送礼物业务编号',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`gift_send_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='礼物赠送表';
- CREATE TABLE `message` (
- `message_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '消息通知编号',
- `type` tinyint(4) unsigned NOT NULL COMMENT '消息类型, 见MessageTypeEnum',
- `user_id` bigint(20) unsigned NOT NULL COMMENT '用户编号',
- `content` varchar(256) NOT NULL COMMENT '消息内容',
- `jump_path` varchar(1024) DEFAULT NULL COMMENT '跳转路径',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`message_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='消息通知表';
- CREATE TABLE `template_room` (
- `template_room_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '房间模板编号',
- `template_name` varchar(64) NOT NULL comment '模板房间名称',
- `type` tinyint(4) unsigned NOT NULL COMMENT '房间类型, 见RoomTypeEnum',
- `notice` varchar(256) DEFAULT NULL COMMENT '房间公告',
- `start_tip` varchar(256) DEFAULT NULL COMMENT '开始提示',
- `start_audio_path` varchar(256) DEFAULT NULL COMMENT '开始音频文件',
- `start_audio_sec` bigint(20) unsigned NOT NULL COMMENT '开始音频时长(秒)',
- `deadline_sec` bigint(20) unsigned NOT NULL COMMENT '房间截止秒数',
- `app_version` bigint(11) unsigned NOT NULL DEFAULT 0 COMMENT '房间支持最低版本',
- `valid` tinyint(4) unsigned NOT NULL COMMENT '房间模板是否有效',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`template_room_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1001 DEFAULT CHARSET=utf8mb4 COMMENT='房间模板表';
- CREATE TABLE `template_phase` (
- `template_phase_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '环节模板编号',
- `name` varchar(64) NOT NULL COMMENT '环节名称',
- `rule` varchar(256) DEFAULT NULL COMMENT '环节规则',
- `type` tinyint(4) unsigned NOT NULL COMMENT '环节类型,见PhaseTypeEnum',
- `app_version` bigint(11) unsigned NOT NULL DEFAULT 0 COMMENT '房间支持最低版本',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`template_phase_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1001 DEFAULT CHARSET=utf8mb4 COMMENT='环节模板表';
- CREATE TABLE `template_room_phase` (
- `template_room_phase_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '房间环节模板编号',
- `template_room_id` bigint(20) unsigned NOT NULL COMMENT '房间模板编号',
- `template_phase_id` bigint(20) unsigned NOT NULL COMMENT '环节模板编号',
- `template_phase_data` varchar(2048) DEFAULT NULL COMMENT '环节模板数据',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- KEY (`template_room_id`),
- PRIMARY KEY (`template_room_phase_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=100001 DEFAULT CHARSET=utf8mb4 COMMENT='房间环节模板表';
- CREATE TABLE `template_question` (
- `template_question_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '房间问题题库编号',
- `question` varchar(256) NOT NULL COMMENT '问题内容',
- `option_a` varchar(32) NOT NULL COMMENT '选项A',
- `option_b` varchar(32) NOT NULL COMMENT '选项B',
- `valid_state` tinyint(4) unsigned NOT NULL COMMENT '有效状态, 见ValidStateEnum',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`template_question_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=100001 DEFAULT CHARSET=utf8mb4 COMMENT='房间问题题库表';
- CREATE TABLE `room` (
- `room_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '房间编号',
- `name` varchar(64) NOT NULL COMMENT '房间名称',
- `notice` varchar(256) DEFAULT NULL COMMENT '房间公告',
- `start_tip` varchar(256) DEFAULT NULL COMMENT '开始提示',
- `start_audio_path` varchar(256) DEFAULT NULL COMMENT '开始音频文件',
- `start_audio_sec` bigint(20) unsigned NOT NULL COMMENT '开始音频时长(秒)',
- `type` tinyint(4) unsigned NOT NULL COMMENT '房间类型, 见RoomTypeEnum',
- `state` tinyint(4) unsigned NOT NULL COMMENT '房间状态, 见RoomStateEnum',
- `deadline_sec` bigint(20) unsigned NOT NULL COMMENT '房间截止秒数',
- `app_version` bigint(11) unsigned NOT NULL DEFAULT 0 COMMENT '房间支持最低版本',
- `template_room_id` bigint(20) unsigned NOT NULL COMMENT '房间模板编号',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`room_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='房间表';
- CREATE TABLE `room_mic` (
- `room_mic_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '房间麦位编号',
- `room_id` bigint(20) unsigned NOT NULL COMMENT '房间编号',
- `user_id` bigint(20) unsigned NOT NULL COMMENT '用户编号',
- `type` tinyint(4) unsigned NOT NULL COMMENT '麦展示类型, 见MicTypeEnum',
- `state` tinyint(4) unsigned NOT NULL COMMENT '麦状态, 见MicStateEnum',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`room_mic_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='房间麦位表';
- CREATE TABLE `room_user` (
- `room_user_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '房间用户编号',
- `room_id` bigint(20) unsigned NOT NULL COMMENT '房间编号',
- `user_id` bigint(20) unsigned NOT NULL COMMENT '用户编号',
- `last_enter_time` DATETIME NOT NULL COMMENT '最后一次进入时间',
- `last_exit_time` DATETIME DEFAULT NULL COMMENT '最后一次离开时间',
- `enter_count` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '进入次数',
- `duration_sec` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '进入时长',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`room_user_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='房间用户表';
- CREATE TABLE `room_phase` (
- `room_phase_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '房间环节编号',
- `room_id` bigint(20) unsigned NOT NULL COMMENT '房间编号',
- `name` varchar(64) NOT NULL COMMENT '环节名称',
- `rule` varchar(256) DEFAULT NULL COMMENT '环节规则',
- `type` tinyint(4) unsigned NOT NULL COMMENT '环节类型, 见PhaseTypeEnum',
- `state` tinyint(4) unsigned NOT NULL COMMENT '环节状态, 见PhaseStateEnum',
- `valid_state` tinyint(4) unsigned NOT NULL DEFAULT 1 COMMENT '在用状态,ValidStateEnum',
- `template_room_phase_id` bigint(20) unsigned NOT NULL COMMENT '房间模环节板编号',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- KEY (`room_id`),
- PRIMARY KEY (`room_phase_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='房间环节表';
- CREATE TABLE `room_match` (
- `room_id` bigint(20) unsigned NOT NULL COMMENT '房间编号',
- `match_id` bigint(20) unsigned NOT NULL COMMENT 'CP配对编号',
- `user_id` bigint(20) unsigned NOT NULL COMMENT '用户编号',
- `match_user_id` bigint(20) unsigned NOT NULL COMMENT '配对用户编号',
- `begin_time` DATETIME NOT NULL COMMENT '开始时间',
- `result` tinyint(4) unsigned NOT NULL COMMENT 'CP配对结果, 见CpResultEnum',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`room_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='CP配对房间表';
- -- 自我介绍
- CREATE TABLE `room_phase_introduce` (
- `room_phase_id` bigint(20) unsigned NOT NULL COMMENT '房间自我介绍环节编号',
- `start_audio_path` varchar(256) DEFAULT NULL COMMENT '开始音频文件',
- `start_audio_sec` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '开始音频时长(秒)',
- `left_audio_path` varchar(256) DEFAULT NULL COMMENT '左侧音频文件',
- `left_audio_sec` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '左侧音频时长(秒)',
- `left_tip` varchar(256) DEFAULT NULL COMMENT '左侧开始提示',
- `right_audio_path` varchar(256) DEFAULT NULL COMMENT '右侧音频文件',
- `right_audio_sec` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '右侧音频时长(秒)',
- `right_tip` varchar(256) DEFAULT NULL COMMENT '右侧开始提示',
- `countdown_sec` bigint(20) unsigned NOT NULL COMMENT '每个人倒计时',
- `user_id` bigint(20) unsigned NOT NULL COMMENT '发起用户编号',
- `user_state` tinyint(4) unsigned NOT NULL COMMENT '发起用户自我介绍状态, 见IntroduceStateEnum',
- `user_begin_time` DATETIME DEFAULT NULL COMMENT '发起用户开始时间',
- `user_end_time` DATETIME DEFAULT NULL COMMENT '发起用户截止时间',
- `match_user_id` bigint(20) unsigned NOT NULL COMMENT '配对用户编号',
- `match_user_state` tinyint(4) unsigned NOT NULL COMMENT '配对用户自我介绍状态, 见IntroduceStateEnum',
- `match_user_begin_time` DATETIME DEFAULT NULL COMMENT '配对用户开始时间',
- `match_user_end_time` DATETIME DEFAULT NULL COMMENT '配对用户截止时间',
- PRIMARY KEY (`room_phase_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='房间自我介绍环节表';
- -- 默契问答
- CREATE TABLE `room_phase_question` (
- `room_phase_id` bigint(20) unsigned NOT NULL COMMENT '房间默契问答环节编号',
- `start_audio_path` varchar(256) DEFAULT NULL COMMENT '开始音频文件',
- `start_audio_sec` bigint(20) unsigned NOT NULL COMMENT '开始音频时长(秒)',
- `total` bigint(20) unsigned NOT NULL COMMENT '选题数量',
- `choose_same_count` bigint(20) unsigned NOT NULL COMMENT '选择一样选题数量',
- `video_tip` varchar(256) DEFAULT NULL COMMENT '视频提示',
- `audio_tip` varchar(256) DEFAULT NULL COMMENT '音频提示',
- `wait_sec` bigint(20) unsigned NOT NULL DEFAULT 2 COMMENT '等待时间',
- `countdown_sec` bigint(20) unsigned NOT NULL COMMENT '每个题目倒计时',
- PRIMARY KEY (`room_phase_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='房间默契问答环节表';
- CREATE TABLE `room_question` (
- `room_question_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '房间题目编号',
- `room_phase_id` bigint(20) unsigned NOT NULL COMMENT '房间默契问答环节编号',
- `template_question_id` bigint(20) unsigned NOT NULL COMMENT '模板题目编号',
- `num` bigint(20) unsigned NOT NULL COMMENT '第几题目',
- `state` tinyint(4) unsigned NOT NULL COMMENT '选择状态, 见QuestionChooseStateEnum',
- `user_choose` varchar(1) DEFAULT NULL COMMENT '发起用户选择',
- `match_user_choose` varchar(1) DEFAULT NULL COMMENT '配对用户选择',
- `begin_time` DATETIME DEFAULT NULL COMMENT '配对用户开始时间',
- `end_time` DATETIME DEFAULT NULL COMMENT '配对用户截止时间',
- PRIMARY KEY (`room_question_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=10000001 DEFAULT CHARSET=utf8mb4 COMMENT='房间题目表';
- -- 自由交流
- CREATE TABLE `room_phase_communication` (
- `room_phase_id` bigint(20) unsigned NOT NULL COMMENT '房间自由交流环节编号',
- `start_audio_path` varchar(256) DEFAULT NULL COMMENT '开始音频文件',
- `start_audio_sec` bigint(20) unsigned NOT NULL COMMENT '开始音频时长(秒)',
- `countdown_sec` bigint(20) unsigned NOT NULL COMMENT '倒计时',
- `mic_type` tinyint(4) unsigned NOT NULL COMMENT '麦位展示类型, 见MicTypeEnum',
- `begin_time` DATETIME DEFAULT NULL COMMENT '自由交流开始时间',
- `end_time` DATETIME DEFAULT NULL COMMENT '自由交流截止时间',
- PRIMARY KEY (`room_phase_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='房间自由交流环节表';
- -- 最终选择
- CREATE TABLE `room_phase_choose` (
- `room_phase_id` bigint(20) unsigned NOT NULL COMMENT '房间最终选择环节编号',
- `start_tip` varchar(256) DEFAULT NULL COMMENT '开始提示',
- `start_audio_path` varchar(256) DEFAULT NULL COMMENT '开始音频文件',
- `start_audio_sec` bigint(20) unsigned NOT NULL COMMENT '开始音频时长(秒)',
- `countdown_sec` bigint(20) unsigned NOT NULL COMMENT '每个题目倒计时',
- `begin_time` DATETIME DEFAULT NULL COMMENT '开始时间',
- `end_time` DATETIME DEFAULT NULL COMMENT '截止时间',
- `user_choose_result` tinyint(4) unsigned NOT NULL COMMENT '选择结果, 见ChooseResultEnum',
- `match_user_choose_result` tinyint(4) unsigned NOT NULL COMMENT '选择结果, 见ChooseResultEnum',
- PRIMARY KEY (`room_phase_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='房间最终选择环节表';
- -- 最后留下
- CREATE TABLE `room_phase_stay` (
- `room_phase_id` bigint(20) unsigned NOT NULL COMMENT '房间最后留下环节编号',
- `start_audio_path` varchar(256) DEFAULT NULL COMMENT '开始音频文件',
- `start_audio_sec` bigint(20) unsigned NOT NULL COMMENT '开始音频时长(秒)',
- `countdown_sec` bigint(20) unsigned NOT NULL COMMENT '每个题目倒计时',
- `begin_time` DATETIME DEFAULT NULL COMMENT '开始时间',
- `end_time` DATETIME DEFAULT NULL COMMENT '截止时间',
- PRIMARY KEY (`room_phase_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='房间最后留下环节表';
- CREATE TABLE `cp_show` (
- `show_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '专场编号',
- `type` tinyint(4) unsigned NOT NULL COMMENT '专场类型,CpShowTypeEnum',
- `min_bean` bigint(20) unsigned NOT NULL COMMENT '竞价最少红豆数',
- `hostess_user_id` bigint(20) unsigned NOT NULL COMMENT '主持用户编号',
- `male_user_id` bigint(20) unsigned NOT NULL COMMENT '男嘉宾用户编号',
- `female1_user_id` bigint(20) unsigned NOT NULL COMMENT '女嘉宾1号用户编号',
- `female2_user_id` bigint(20) unsigned NOT NULL COMMENT '女嘉宾2号用户编号',
- `female3_user_id` bigint(20) unsigned NOT NULL COMMENT '女嘉宾3号用户编号',
- `female4_user_id` bigint(20) unsigned NOT NULL COMMENT '女嘉宾4号用户编号',
- `apply_end_time` DATETIME DEFAULT NULL COMMENT '报名截止时间',
- `begin_time` DATETIME DEFAULT NULL COMMENT '开始时间',
- `state` tinyint(4) unsigned NOT NULL COMMENT '专场状态,CpShowStateEnum',
- `room_id` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '房间编号',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`show_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='专场表';
- CREATE TABLE `cp_show_candidate` (
- `candidate_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '专场报名编号',
- `show_id` bigint(20) unsigned NOT NULL COMMENT '专场编号',
- `user_id` bigint(20) unsigned NOT NULL COMMENT '报名用户编号',
- `type` tinyint(4) unsigned NOT NULL COMMENT '专场报名类型,CpShowCandidateTypeEnum',
- `bean` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '竞价消耗红豆数量',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`candidate_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='专场报名表';
- CREATE TABLE `cp_show_candidate_bidding` (
- `bidding_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '专场报名竞价编号',
- `candidate_id` bigint(20) unsigned NOT NULL COMMENT '专场报名编号',
- `show_id` bigint(20) unsigned NOT NULL COMMENT '专场编号',
- `user_id` bigint(20) unsigned NOT NULL COMMENT '报名用户编号',
- `bean` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '竞价消耗红豆数量',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`bidding_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='专场报名竞价表';
- CREATE TABLE `room_show` (
- `room_id` bigint(20) unsigned NOT NULL COMMENT '专场房间编号',
- `show_id` bigint(20) unsigned NOT NULL COMMENT '专场编号',
- `type` tinyint(4) unsigned NOT NULL COMMENT '专场类型,CpShowTypeEnum',
- `view_user_id` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '导播视角用户编号',
- `hostess_user_id` bigint(20) unsigned NOT NULL COMMENT '主持用户编号',
- `male_user_id` bigint(20) unsigned NOT NULL COMMENT '男嘉宾用户编号',
- `female1_user_id` bigint(20) unsigned NOT NULL COMMENT '女嘉宾1号用户编号',
- `female2_user_id` bigint(20) unsigned NOT NULL COMMENT '女嘉宾2号用户编号',
- `female3_user_id` bigint(20) unsigned NOT NULL COMMENT '女嘉宾3号用户编号',
- `female4_user_id` bigint(20) unsigned NOT NULL COMMENT '女嘉宾4号用户编号',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`room_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='专场房间表';
- CREATE TABLE `room_show_female` (
- `room_female_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '房间女嘉宾编号',
- `room_id` bigint(20) unsigned NOT NULL COMMENT '房间编号',
- `user_id` bigint(20) unsigned NOT NULL COMMENT '用户编号',
- `light_num` bigint(20) unsigned NOT NULL DEFAULT 3 COMMENT '亮灯数量',
- `male_enter_light_state` tinyint(4) unsigned NOT NULL COMMENT '男嘉宾进场灯状态,RoomLightStateEnum',
- `female_question_light_state` tinyint(4) unsigned NOT NULL COMMENT '女嘉宾提问灯状态,RoomLightStateEnum',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`room_female_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='房间女嘉宾编号';
- CREATE TABLE `room_show_male` (
- `room_male_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '房间男嘉宾编号',
- `room_id` bigint(20) unsigned NOT NULL COMMENT '房间编号',
- `user_id` bigint(20) unsigned NOT NULL COMMENT '用户编号',
- `heart_user_id` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '心动女生编号',
- `choose_user_id` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '最终选择女生编号',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`room_male_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='房间男嘉宾编号';
- -- 开始
- CREATE TABLE `room_phase_first` (
- `room_phase_id` bigint(20) unsigned NOT NULL COMMENT '环节编号',
- `title` varchar(256) DEFAULT NULL COMMENT '标题',
- PRIMARY KEY (`room_phase_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='开始环节表';
- -- 结束
- CREATE TABLE `room_phase_last` (
- `room_phase_id` bigint(20) unsigned NOT NULL COMMENT '环节编号',
- `title` varchar(256) DEFAULT NULL COMMENT '标题',
- PRIMARY KEY (`room_phase_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='结束环节表';
- CREATE TABLE `room_phase_male_enter` (
- `room_phase_id` bigint(20) unsigned NOT NULL COMMENT '环节编号',
- `title` varchar(256) DEFAULT NULL COMMENT '标题',
- PRIMARY KEY (`room_phase_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='男嘉宾进场环节表';
- CREATE TABLE `room_phase_female_enter` (
- `room_phase_id` bigint(20) unsigned NOT NULL COMMENT '环节编号',
- `title` varchar(256) DEFAULT NULL COMMENT '标题',
- PRIMARY KEY (`room_phase_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='女嘉宾进场环节表';
- CREATE TABLE `room_phase_male_heart` (
- `room_phase_id` bigint(20) unsigned NOT NULL COMMENT '环节编号',
- `title` varchar(256) DEFAULT NULL COMMENT '标题',
- PRIMARY KEY (`room_phase_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='男嘉宾选择心动女生环节表';
- CREATE TABLE `room_phase_female_question` (
- `room_phase_id` bigint(20) unsigned NOT NULL COMMENT '环节编号',
- `title` varchar(256) DEFAULT NULL COMMENT '标题',
- PRIMARY KEY (`room_phase_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='女嘉宾提问环节表';
- CREATE TABLE `room_phase_male_question` (
- `room_phase_id` bigint(20) unsigned NOT NULL COMMENT '环节编号',
- `title` varchar(256) DEFAULT NULL COMMENT '标题',
- PRIMARY KEY (`room_phase_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='男嘉宾提问环节表';
- CREATE TABLE `room_phase_male_choose` (
- `room_phase_id` bigint(20) unsigned NOT NULL COMMENT '环节编号',
- `title` varchar(256) DEFAULT NULL COMMENT '标题',
- PRIMARY KEY (`room_phase_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='男嘉宾最终选择环节表';
- -- 不要脱单星球活动
- CREATE TABLE `activity_star_member` (
- `star_member_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '星球成员编号',
- `openid` varchar(64) DEFAULT NULL COMMENT '微信openid',
- `unionid` varchar(64) DEFAULT NULL COMMENT '微信unionid',
- `username` varchar(16) NOT NULL COMMENT '姓名',
- `phone` varchar(11) NOT NULL COMMENT '手机号码',
- `wechat` varchar(64) NOT NULL COMMENT '微信号',
- `type` tinyint(4) unsigned NOT NULL COMMENT '类型,见StarMemberTypeEnum',
- `state` tinyint(4) unsigned NOT NULL COMMENT '状态,见StarMemberStateEnum',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`star_member_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='脱单星球活动报名表';
- CREATE TABLE `sys_interest_tag` (
- `interest_tag_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '个性标签编号',
- `group` varchar(16) NOT NULL COMMENT '个性标签分组',
- `name` varchar(64) NOT NULL COMMENT '个性标签名称',
- `state` tinyint(4) unsigned NOT NULL COMMENT '状态,见InterestTagStateEnum',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`interest_tag_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1000000001 DEFAULT CHARSET=utf8mb4 COMMENT='个性标签表';
- CREATE TABLE `sys_topic` (
- `topic_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '话题编号',
- `name` varchar(64) NOT NULL COMMENT '名称',
- `image_url` varchar(256) DEFAULT NULL COMMENT '图片地址',
- `recommend` tinyint(4) unsigned NOT NULL COMMENT '推荐标识,见TopicTagRecommendEnum',
- `hot` tinyint(4) unsigned NOT NULL COMMENT '热门标识,见TopicTagHotEnum',
- `top` tinyint(4) unsigned NOT NULL COMMENT '置顶标识,见TopicTagTopEnum',
- `sort_flag` int(11) unsigned NOT NULL COMMENT '排序',
- `state` tinyint(4) unsigned NOT NULL COMMENT '状态,见TopicStateEnum',
- `create_user_id` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '创建用户编号',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`topic_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=10000001 DEFAULT CHARSET=utf8mb4 COMMENT='话题表';
- CREATE TABLE `sys_occupation` (
- `occupation_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '职业编号',
- `parent_occupation_id` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '父职业编号',
- `name` varchar(64) NOT NULL COMMENT '名称',
- `sort_flag` int(11) unsigned NOT NULL COMMENT '排序',
- `state` tinyint(4) unsigned NOT NULL COMMENT '状态,见OccupationStateEnum',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`occupation_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=10000001 DEFAULT CHARSET=utf8mb4 COMMENT='职业表';
- CREATE TABLE `sys_sensitive_words` (
- `sensitive_words_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '敏感词编号',
- `sensitive_words` varchar(64) NOT NULL COMMENT '敏感词',
- `admin_id` bigint(20) unsigned NOT NULL COMMENT '管理员编号',
- `gmt_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `gmt_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- PRIMARY KEY (`sensitive_words_id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=10000001 DEFAULT CHARSET=utf8mb4 COMMENT='敏感词表';
|