电视台表结构

简介:

1,电视台表结构,包括推送的三张表

Sql代码   收藏代码
  1. create database tv;  
  2. use tv;  
  3. create table t_user(  
  4.     id int(10) auto_increment primary key,  
  5.     username varchar(50),  
  6.     password varchar(50),  
  7.     nickname varchar(20),  
  8.     create_id int(10) unsigned,  
  9.     create_time bigint(10) unsigned,  
  10.     update_time bigint(10) unsigned,  
  11.     status int(2) unsigned default 1,  
  12.     email varchar(50),  
  13.     potrait varchar(50),  
  14.     level int(2) unsigned default 0,  
  15.     reserved varchar(250)  
  16. );  
  17.   
  18. create table t_admin(  
  19.     id int(10) unsigned auto_increment primary key,  
  20.     username varchar(50),  
  21.     password varchar(50),  
  22.     nickname varchar(20),  
  23.     create_id int(10) unsigned,  
  24.     create_time bigint(10) unsigned,  
  25.     status int(2) unsigned,  
  26.     email varchar(50),  
  27.     potrait varchar(50),  
  28.     lastlogintime bigint(10) unsigned,  
  29.     loginip varchar(30),  
  30.     type smallint(1) unsigned,  
  31.     reserved varchar(250)  
  32. );  
  33.   
  34. create table t_admin_operation_log(  
  35.     id int(10) unsigned auto_increment primary key,  
  36.     username varchar(50),  
  37.     scriptname varchar(50),  
  38.     url varchar(200),  
  39.     optime int(10) unsigned  
  40. );  
  41.   
  42. create table t_user_log(  
  43.     id int(10) unsigned auto_increment primary key,  
  44.     userId int(10) unsigned,  
  45.     login_time int(10) unsigned,  
  46.     login_result int(10) unsigned,  
  47.     cause varchar(250),  
  48.     user_agent varchar(250),  
  49.     ip varchar(250),  
  50.     reserved varchar(250)  
  51. );  
  52.   
  53. create table t_news(  
  54.     id int(10) unsigned auto_increment primary key,  
  55.     type int(5) unsigned,  
  56.     title varchar(250),  
  57.     pic varchar(250),  
  58.     content longtext,  
  59.     keyword varchar(250),  
  60.     releaseId int(10) unsigned,  
  61.     userId int(10) unsigned,  
  62.     release_time bigint(10) unsigned,  
  63.     deleteId int(10) unsigned,  
  64.     delete_time bigint(10) unsigned,  
  65.     sticktop int(2) unsigned,  
  66.     status int(2) unsigned,  
  67.     reserved varchar(250)  
  68. );  
  69.   
  70.   
  71. create table t_comment(  
  72.     id int(10) unsigned auto_increment primary key,  
  73.     from_userId int(10) unsigned,  
  74.     from_username varchar(50),  
  75.     release_time bigint(10) unsigned,  
  76.     comments longtext,  
  77.     target_type int(2) unsigned,  
  78.     targetId int(10) unsigned,  
  79.     status int(2) unsigned,  
  80.     deleteId int(10) unsigned,  
  81.     delete_time bigint(10) unsigned,  
  82.     reserved varchar(250)  
  83. );  
  84.   
  85. create table t_business_information(  
  86.     id int(10) unsigned auto_increment primary key,  
  87.     type int(5) unsigned,  
  88.     title varchar(250),  
  89.     pic varchar(250),  
  90.     link varchar(250),  
  91.     from_websit varchar(250),  
  92.     status int(2) unsigned,  
  93.     releaseId int(10) unsigned,  
  94.     release_time bigint(10) unsigned,  
  95.     deleteId int(10) unsigned,  
  96.     delete_time bigint(10) unsigned,  
  97.     reserved varchar(250)  
  98. );  
  99.   
  100. create table t_video(  
  101.     id int(10) unsigned auto_increment primary key,  
  102.     column_type int(5) unsigned default 0,  
  103.     title varchar(250),  
  104.     url varchar(250),  
  105.     path varchar(250),  
  106.     videoformat varchar(250),  
  107.     type int(2) unsigned,  
  108.     status int(2) unsigned,  
  109.     releaseId int(10) unsigned,  
  110.     release_time bigint(10) unsigned,  
  111.     deleteId int(10) unsigned,  
  112.     delete_time bigint(10) unsigned,  
  113.     reserved varchar(250)  
  114. );  
  115.   
  116. create table t_notice(  
  117.     id int(10) unsigned auto_increment primary key,  
  118.     type int(5) unsigned,  
  119.     title varchar(250),  
  120.     content longtext,  
  121.     status int(2) unsigned,  
  122.     releaseId int(10) unsigned,  
  123.     release_time bigint(10) unsigned,  
  124.     deleteId int(10) unsigned,  
  125.     delete_time bigint(10) unsigned,  
  126.     reserved varchar(250)  
  127. );  
  128.   
  129. create table t_bbs(  
  130.     id int(10) unsigned auto_increment primary key,  
  131.     type int(5) unsigned,  
  132.     title varchar(250),  
  133.     cardcontent longtext,  
  134.     click int(10) unsigned,  
  135.     status int(2) unsigned,  
  136.     releaseId int(10) unsigned,  
  137.     release_name varchar(50),  
  138.     release_time bigint(10) unsigned,  
  139.     deleteId int(10) unsigned,  
  140.     delete_time bigint(10) unsigned,  
  141.     reserved varchar(250)  
  142. );  
  143.   
  144. create table t_user_sendcard(  
  145.     id int(10) unsigned auto_increment primary key,  
  146.     title varchar(250),  
  147.     followcardcontent text ,  
  148.     cardid int(10) unsigned,  
  149.     card_type int(2) unsigned,  
  150.     click int(10) unsigned,  
  151.     status int(2) unsigned,  
  152.     releaseId int(10) unsigned,  
  153.     from_username varchar(50),  
  154.     release_time bigint(10) unsigned,  
  155.     deleteId int(10) unsigned,  
  156.     delete_time bigint(10) unsigned,  
  157.     reserved varchar(250)  
  158. );  
  159.   
  160. create table t_sendauditing(  
  161.     id int(10) unsigned auto_increment primary key,  
  162.     sendcardid int(10) unsigned,  
  163.     auditingstatus int(2) unsigned,  
  164.     compositor int(2) unsigned  
  165. );  
  166.   
  167. create table t_tip_off(  
  168.     id int(10) unsigned auto_increment primary key,  
  169.     title varchar(250),  
  170.     pic varchar(250),  
  171.     content varchar(250),  
  172.     status int(2) unsigned,  
  173.     releaseId int(10) unsigned,  
  174.     release_name varchar(50),  
  175.     release_time bigint(10) unsigned,  
  176.     deleteId int(10) unsigned,  
  177.     delete_time bigint(10) unsigned,  
  178.     reserved varchar(250)  
  179. );  
  180.   
  181. create table t_dictionary(  
  182.     id int(10) unsigned auto_increment primary key,  
  183.     groupId varchar(250),  
  184.     key2 varchar(250),  
  185.     value varchar(250),  
  186.     description varchar(250)  
  187. );  
  188.   
  189. create table t_investigation(  
  190.     id int(10) unsigned auto_increment primary key,  
  191.     exam_name varchar(250),  
  192.     create_time bigint(10) unsigned,  
  193.     exam_time int(10) unsigned,  
  194.     score int(10) unsigned,  
  195.     userId int(10) unsigned,  
  196.     releaseId int(10) unsigned,  
  197.     deleteId int(10) unsigned,  
  198.     delete_time bigint(10) unsigned,  
  199.     reserved varchar(250)  
  200. );  
  201.   
  202. create table t_questioncontent(  
  203.     id int(10) unsigned auto_increment primary key,  
  204.     tittle varchar(255),  
  205.     pic varchar(255),  
  206.     option_length int(5) unsigned,  
  207.     option_a varchar(255),  
  208.     option_b varchar(255),  
  209.     option_c varchar(255),  
  210.     option_d varchar(255),  
  211.     option_e varchar(255),  
  212.     right_answer varchar(255),  
  213.     right_multiAnser varchar(255),  
  214.     reserved varchar(250)  
  215. );  
  216.   
  217. create table t_question(  
  218.     id int(10) unsigned auto_increment primary key,  
  219.     description varchar(255),  
  220.     question_type int(5) unsigned,  
  221.     single_score int(5) unsigned,  
  222.     questionContentId int(10) unsigned  
  223. );  
  224.   
  225. create table t_questionresult(  
  226.     id int(10) unsigned auto_increment primary key,  
  227.     result_answer varchar(255),  
  228.     resultMultiAnser varchar(255),  
  229.     resultState int(1) unsigned,  
  230.     questionId int(10) unsigned,  
  231.     investigationId int(10) unsigned  
  232. );  
  233.   
  234. create table t_user_feedback(  
  235.     id int(10) unsigned auto_increment primary key,  
  236.     type int(2) unsigned,  
  237.     content varchar(250),  
  238.     userId int(10) unsigned,  
  239.     release_time bigint(10) unsigned,  
  240.     status int(2) unsigned,  
  241.     deleteId int(10) unsigned,  
  242.     delete_time bigint(10) unsigned,  
  243.     reserved varchar(250)  
  244. );  
  245.   
  246. /* 设备注册表*/  
  247. create table t_push_device(  
  248.     `id` int(10) unsigned NOT NULL auto_increment COMMENT 'ID',  
  249.     userId int(10) unsigned unique  null COMMENT '用户数据库ID',  
  250.     username varchar(50),  
  251.     device_id varchar(50) unique not null COMMENT '设备唯一标识',  
  252.     device_register_time varchar(50) COMMENT '设备注册时间',  
  253.     os_type varchar(10) COMMENT '设备操作系统类型android or ios',  
  254.     os_version varchar(10) COMMENT '设备操作系统版本,例如4.3.1,8.3',  
  255.     reserved varchar(250) COMMENT '预留信息,暂时没有用',  
  256.     device_info varchar(255) comment '移动设备的其他信息,比如uuid,mac地址,手机型号等',  
  257.     PRIMARY KEY  (`id`)  
  258. );  
  259. /* 推送消息表 */  
  260. create table t_push_message(  
  261.     `id` int(10) unsigned NOT NULL auto_increment COMMENT 'ID',  
  262.     to_userId int(10) unsigned,  
  263.     to_username varchar(50)   null COMMENT '用户邮箱,满足唯一性',  
  264.     push_title varchar(250) COMMENT '推送消息标题',  
  265.     push_content varchar(250) COMMENT '推送消息内容',  
  266.     push_time varchar(50) COMMENT '推送日期,格式:yyyy-MM-dd HH:mm:ss',  
  267.     bulk_or_point varchar(10) COMMENT '是否是定点推送,取值bulk,point',  
  268.     reserved varchar(250) COMMENT '预留信息,暂时没有用',  
  269.     fromuid int(10) unsigned,  
  270.     PRIMARY KEY  (`id`)  
  271. );  
  272. -- 用户访问日志  
  273. create table t_access_log(  
  274.     id int(10) unsigned auto_increment primary key,  
  275.     os_type varchar(10) comment '设备类型android or ios',  
  276.     device_id varchar(50) comment '设备标示(device token or clientid)',  
  277.     access_day varchar(50),  
  278.     requestURI varchar(50),  
  279.     userId int(10) unsigned comment '登录用户的数据库ID',  
  280.     username  varchar(50)  comment '登录用户',  
  281.     time bigint(10) unsigned,  
  282.     ip varchar(50) comment '内网ip',  
  283.     extranet_ip varchar(50) comment '外网ip',  
  284.     description varchar(50),  
  285.     access_type smallint(1) unsigned,  
  286.     reserved varchar(250)  
  287. );  
  288.   
  289. --压缩图片失败的日志  
  290. create table t_compress_failed_pic (  
  291.     id integer not null auto_increment, cause varchar(255),   
  292.     failed_time datetime comment '失败的时间',   
  293.     original_size bigint comment '图片原始大小',   
  294.     pic_path varchar(255),   
  295.     primary key (id)  
  296.     )  
  297. -- 简单的消息,没有发布者  
  298. create table t_simple_info (  
  299.     id integer not null auto_increment,   
  300.     create_time bigint, info longtext,   
  301.     status integer not null comment '1:可用;2:不可用',   
  302.     primary key (id)  
  303.     )  
  304.       
  305.     alter table t_push_device add index FK_4e4qn4vp4du6e5okbn0dq3wdf (userId), add constraint FK_4e4qn4vp4du6e5okbn0dq3wdf foreign key (userId) references t_user (id)  
  306.       
  307.   
  308. --接收到的推送消息  
  309. create table t_received_push_message (  
  310.     id integer not null auto_increment,   
  311.     fromuid integer,   
  312.     push_content varchar(255),   
  313.     push_title varchar(255),   
  314.     received_time varchar(255),   
  315.     reserved varchar(255),   
  316.     to_userId integer,   
  317.     primary key (id)  
  318. )  
  319. alter table t_push_message add index FK_ek2r577b6r0i1r49qsh724wnl (to_userId), add constraint FK_ek2r577b6r0i1r49qsh724wnl foreign key (to_userId) references t_user (id)  
  320. alter table t_received_push_message add index FK_1id8pc8ubfv8dg4k1sq8o4fxr (to_userId), add constraint FK_1id8pc8ubfv8dg4k1sq8o4fxr foreign key (to_userId) references t_user (id)  

 

相关文章
|
SQL 关系型数据库 MySQL
省市区管理sql数据表设计、以及全国省市区全部最新数据
省市区管理sql数据表设计、以及全国省市区全部最新数据
1155 0
省市区管理sql数据表设计、以及全国省市区全部最新数据
|
7天前
|
关系型数据库 分布式数据库 数据库
PolarDB闪电助攻,《香肠派对》百亿好友关系实现毫秒级查询
PolarDB分布式版助力《香肠派对》实现百亿好友关系20万QPS的毫秒级查询。
PolarDB闪电助攻,《香肠派对》百亿好友关系实现毫秒级查询
|
6月前
|
存储 SQL 运维
单表 1000 万条数据,TDengine 助力麦当劳中国实现 PERCENTILE 秒级查询优化
今天我们为大家分享一个关于 TDengine 在 PERCENTILE 函数性能优化上的真实案例。
79 0
|
7月前
|
SQL 关系型数据库 MySQL
分享一份全国行政区划sql数据库表
分享一份全国行政区划sql数据库表
|
9月前
|
存储 安全 数据库
【机房重构】—触发器经营离婚事务所
所以一定要再去离婚事务所的时候想清楚了(慎用触发器);如果你没有任何思考而是一时的冲动贸然去离婚事务所办理了离婚手续,必然会后悔终身(对于触发器的过分依赖,势必影响数据库的结构,同时增加了维护的复杂程度)。
|
SQL 存储 缓存
宽表为什么横行?
宽表为什么横行?
41395 8
宽表为什么横行?
好客租房135-获取并处理城市列表数据(热门处理数据)
好客租房135-获取并处理城市列表数据(热门处理数据)
104 0
好客租房135-获取并处理城市列表数据(热门处理数据)
好客租房133-获取并处理城市列表数据
好客租房133-获取并处理城市列表数据
78 0
好客租房133-获取并处理城市列表数据
|
数据格式
好客租房134-获取并处理城市列表数据
好客租房134-获取并处理城市列表数据
83 0
好客租房134-获取并处理城市列表数据
|
SQL 数据库
56-KTV点歌系统数据库-明星信息数据操作
56-KTV点歌系统数据库-明星信息数据操作
602 0