install.sql 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. create table config
  2. (
  3. user_id int null,
  4. config json null
  5. );
  6. create table history
  7. (
  8. id bigint auto_increment
  9. primary key,
  10. user_id int null,
  11. link json null,
  12. constraint history_id_uindex
  13. unique (id)
  14. )
  15. comment 'link历史数据';
  16. create table link
  17. (
  18. user_id int null,
  19. link json null
  20. );
  21. create table linkstore
  22. (
  23. id int auto_increment
  24. primary key,
  25. name varchar(20) null,
  26. src varchar(255) null,
  27. url varchar(255) null,
  28. type varchar(20) default 'icon' null,
  29. size varchar(20) default '1x1' null,
  30. create_time datetime null,
  31. hot bigint default 0 null,
  32. area varchar(20) default '' null comment '专区',
  33. tips varchar(30) null comment '介绍',
  34. domain varchar(100) null,
  35. app int default 0 null comment '是否app',
  36. install_num int default 0 null comment '安装量',
  37. constraint linkStore_id_uindex
  38. unique (id)
  39. );
  40. create table note
  41. (
  42. id bigint auto_increment
  43. primary key,
  44. user_id bigint null,
  45. title varchar(50) null,
  46. text text null,
  47. create_time datetime null,
  48. update_time datetime null,
  49. constraint note_id_uindex
  50. unique (id)
  51. );
  52. create index note_user_id_index
  53. on note (user_id);
  54. create table setting
  55. (
  56. `keys` varchar(200) not null
  57. primary key,
  58. value text null
  59. );
  60. create table tabbar
  61. (
  62. user_id int null,
  63. tabs json null
  64. )
  65. comment '用户页脚信息';
  66. create table token
  67. (
  68. id bigint auto_increment
  69. primary key,
  70. user_id int null,
  71. token tinytext null,
  72. create_time int null,
  73. ip tinytext null,
  74. user_agent tinytext null,
  75. constraint token_id_uindex
  76. unique (id)
  77. );
  78. create table user
  79. (
  80. id int auto_increment
  81. primary key,
  82. mail varchar(50) null,
  83. password tinytext null,
  84. create_time datetime null,
  85. login_ip varchar(100) null comment '登录IP',
  86. register_ip varchar(100) null comment '注册IP',
  87. manager int default 0 null,
  88. login_fail_count int default 0 null,
  89. login_time datetime null comment '登录时间',
  90. constraint user_id_uindex
  91. unique (id),
  92. constraint user_mail_uindex
  93. unique (mail)
  94. );
  95. create table link_folder
  96. (
  97. id int auto_increment comment 'id'
  98. primary key,
  99. name varchar(50) null comment '分类名称',
  100. sort int default 0 null
  101. )
  102. comment '标签链接分类';
  103. INSERT INTO linkstore (name, src, url, type, size, create_time, hot, area, tips, domain, app, install_num) VALUES ('Bilibili', '/static/bilibili.png', 'https://bilibili.com', 'icon', '1x1', '2022-11-07 21:51:42', 0, '娱乐,社交,推荐,资讯', 'Bilibili弹幕视频网站Acg网站', 'bilibili.com,www.bilibili.com', 0, 0);
  104. INSERT INTO linkstore (name, src, url, type, size, create_time, hot, area, tips, domain, app, install_num) VALUES ('蓝易云', '/static/tsy.png', 'https://www.tsyvps.com/aff/IRYIGFMX', 'icon', '1x1', '2022-11-07 22:02:41', 0, '综合,开发,推荐', '蓝易云-持证高性价比服务器', 'www.tsyvps.com,tsyvps.com', 0, 0);
  105. INSERT INTO linkstore (name, src, url, type, size, create_time, hot, area, tips, domain, app, install_num) VALUES ('ImgUrl', '/static/imgurl.png', 'https://imgurl.ink', 'icon', '1x1', '2022-11-07 22:05:46', 0, '推荐,综合,开发,在线工具', 'ImgUrl图床,图片外链', 'imgurl.ink,www.imgurl.ink', 0, 0);
  106. INSERT INTO linkstore (name, src, url, type, size, create_time, hot, area, tips, domain, app, install_num) VALUES ('微博', '/static/weibo.png', 'http://weibo.com/', 'icon', '1x1', '2022-11-07 23:37:22', 1, '推荐,资讯,娱乐,社交', '微博-随时随地发现新鲜事', 'weibo.com,www.weibo.com', 0, 0);
  107. INSERT INTO linkstore (name, src, url, type, size, create_time, hot, area, tips, domain, app, install_num) VALUES ('火山翻译', '/static/huoshanfanyi.png', 'https://translate.volcengine.com/translate', 'icon', '1x1', '2022-11-07 23:42:49', 1, '推荐,在线工具,效率', '火山翻译-字节跳动旗下机器翻译品牌', 'translate.volcengine.com', 1, 1);
  108. INSERT INTO linkstore (name, src, url, type, size, create_time, hot, area, tips, domain, app, install_num) VALUES ('腾讯云', '/static/tencentcloud.png', 'https://cloud.tencent.com/', 'icon', '1x1', '2022-11-10 16:25:51', 1, '开发,推荐,综合', '腾讯云', 'cloud.tencent.com', 0, 0);
  109. INSERT INTO linkstore (name, src, url, type, size, create_time, hot, area, tips, domain, app, install_num) VALUES ('阿里云', '/static/aliyun.png', 'https://www.aliyun.com/', 'icon', '1x1', '2022-11-10 17:30:17', 1, '推荐,开发', '阿里云', 'www.aliyun.com,aliyun.com', 0, 0);
  110. INSERT INTO linkstore (name, src, url, type, size, create_time, hot, area, tips, domain, app, install_num) VALUES ('腾讯视频', '/static/txsp.png', 'https://v.qq.com/channel/choice?channel_2022=1', 'icon', '1x1', '2022-12-19 19:34:45', 0, '娱乐', '腾讯视频', 'v.qq.com', 0, 0);
  111. INSERT INTO linkstore (name, src, url, type, size, create_time, hot, area, tips, domain, app, install_num) VALUES ('记事本', '/static/note.png', '/noteApp', 'icon', '1x1', '2023-06-14 21:13:15', 1, '系统,在线工具', '记事本App', '/noteApp', 1, 3);