No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

yzncms.sql 25KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  1. /*
  2. YznCMS Install SQL
  3. Date: 2024-02-05 09:17:57
  4. */
  5. SET FOREIGN_KEY_CHECKS = 0;
  6. -- ----------------------------
  7. -- Table structure for `yzn_admin`
  8. -- ----------------------------
  9. DROP TABLE IF EXISTS `yzn_admin`;
  10. CREATE TABLE `yzn_admin` (
  11. `id` smallint(3) unsigned NOT NULL AUTO_INCREMENT COMMENT '用户ID',
  12. `username` varchar(20) DEFAULT NULL COMMENT '管理账号',
  13. `password` varchar(32) DEFAULT NULL COMMENT '管理密码',
  14. `roleid` tinyint(4) unsigned DEFAULT '0' COMMENT '规则ID',
  15. `encrypt` varchar(6) DEFAULT NULL COMMENT '加密因子',
  16. `nickname` varchar(16) NOT NULL COMMENT '昵称',
  17. `last_login_time` int(10) unsigned DEFAULT NULL COMMENT '最后登录时间',
  18. `login_failure` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '失败次数',
  19. `create_time` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
  20. `update_time` int(10) unsigned DEFAULT NULL COMMENT '更新时间',
  21. `last_login_ip` varchar(50) NOT NULL DEFAULT '' COMMENT '最后登录IP',
  22. `email` varchar(40) DEFAULT NULL COMMENT '电子邮箱',
  23. `mobile` varchar(11) DEFAULT '' COMMENT '手机号码',
  24. `token` varchar(60) NOT NULL DEFAULT '' COMMENT 'Session标识',
  25. `status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '状态',
  26. PRIMARY KEY (`id`),
  27. KEY `username` (`username`)
  28. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='管理员表';
  29. -- ----------------------------
  30. -- Records of yzn_admin
  31. -- ----------------------------
  32. INSERT INTO `yzn_admin` VALUES (1, 'admin', '9724b5e6c56b95f5723009ef81961bfe', 1, 'Wo0bAa', '御宅男', 1546940765,0,1546940765,1546940765, '127.0.0.1', '530765310@qq.com', '', '',1);
  33. -- ----------------------------
  34. -- Table structure for `yzn_adminlog`
  35. -- ----------------------------
  36. DROP TABLE IF EXISTS `yzn_adminlog`;
  37. CREATE TABLE `yzn_adminlog` (
  38. `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  39. `admin_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '管理员ID',
  40. `username` varchar(30) DEFAULT '' COMMENT '管理员名字',
  41. `url` varchar(1500) DEFAULT '' COMMENT '操作页面',
  42. `title` varchar(100) DEFAULT '' COMMENT '日志标题',
  43. `content` longtext NOT NULL COMMENT '内容',
  44. `ip` varchar(50) DEFAULT '' COMMENT 'IP',
  45. `useragent` varchar(255) DEFAULT '' COMMENT 'User-Agent',
  46. `create_time` int(10) unsigned DEFAULT NULL COMMENT '操作时间',
  47. PRIMARY KEY (`id`),
  48. KEY `name` (`username`)
  49. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='操作日志';
  50. -- ----------------------------
  51. -- Table structure for `yzn_attachment`
  52. -- ----------------------------
  53. DROP TABLE IF EXISTS `yzn_attachment`;
  54. CREATE TABLE `yzn_attachment` (
  55. `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  56. `category` varchar(50) DEFAULT '' COMMENT '类别',
  57. `admin_id` smallint(3) unsigned NOT NULL DEFAULT '0' COMMENT '管理员id',
  58. `user_id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
  59. `name` varchar(100) NOT NULL DEFAULT '' COMMENT '文件名',
  60. `path` varchar(255) NOT NULL DEFAULT '' COMMENT '文件路径',
  61. `thumb` varchar(255) NOT NULL DEFAULT '' COMMENT '缩略图路径',
  62. `url` varchar(255) NOT NULL DEFAULT '' COMMENT '文件链接',
  63. `mime` varchar(100) NOT NULL DEFAULT '' COMMENT '文件mime类型',
  64. `ext` varchar(4) NOT NULL DEFAULT '' COMMENT '文件类型',
  65. `size` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '文件大小',
  66. `md5` varchar(32) NOT NULL DEFAULT '' COMMENT '文件md5',
  67. `sha1` varchar(40) NOT NULL DEFAULT '' COMMENT 'sha1 散列值',
  68. `driver` varchar(16) NOT NULL DEFAULT 'local' COMMENT '上传驱动',
  69. `create_time` int(10) unsigned DEFAULT NULL COMMENT '上传时间',
  70. `update_time` int(10) unsigned DEFAULT NULL COMMENT '更新时间',
  71. `listorders` int(5) NOT NULL DEFAULT '100' COMMENT '排序',
  72. `status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '状态',
  73. PRIMARY KEY (`id`)
  74. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='附件表';
  75. -- ----------------------------
  76. -- Table structure for `yzn_auth_group`
  77. -- ----------------------------
  78. DROP TABLE IF EXISTS `yzn_auth_group`;
  79. CREATE TABLE `yzn_auth_group` (
  80. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT COMMENT '用户组id,自增主键',
  81. `parentid` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '父组别',
  82. `title` varchar(20) NOT NULL DEFAULT '' COMMENT '用户组中文名称',
  83. `description` varchar(80) NOT NULL DEFAULT '' COMMENT '描述信息',
  84. `rules` text NOT NULL COMMENT '用户组拥有的规则id,多个规则 , 隔开',
  85. `status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '状态',
  86. PRIMARY KEY (`id`)
  87. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='权限组表';
  88. -- ----------------------------
  89. -- Records of yzn_auth_group
  90. -- ----------------------------
  91. INSERT INTO `yzn_auth_group` VALUES (1, 0, '超级管理员', '拥有所有权限', '*', 1);
  92. INSERT INTO `yzn_auth_group` VALUES (2, 1, '编辑', '编辑', '', 1);
  93. -- ----------------------------
  94. -- Table structure for yzn_auth_rule
  95. -- ----------------------------
  96. DROP TABLE IF EXISTS `yzn_auth_rule`;
  97. CREATE TABLE `yzn_auth_rule` (
  98. `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT COMMENT '规则id,自增主键',
  99. `parentid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '父ID',
  100. `name` varchar(100) DEFAULT '' COMMENT '规则名称',
  101. `title` varchar(50) DEFAULT '' COMMENT '规则名称',
  102. `icon` varchar(50) DEFAULT '' COMMENT '图标',
  103. `url` varchar(255) DEFAULT '' COMMENT '规则URL',
  104. `condition` varchar(255) DEFAULT '' COMMENT '条件',
  105. `remark` varchar(255) DEFAULT '' COMMENT '备注',
  106. `ismenu` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否为菜单',
  107. `menutype` enum('_iframe','_blank','_layer') DEFAULT NULL COMMENT '菜单类型',
  108. `extend` varchar(255) DEFAULT '' COMMENT '扩展属性',
  109. `create_time` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
  110. `update_time` int(10) unsigned DEFAULT NULL COMMENT '更新时间',
  111. `listorder` smallint(3) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
  112. `status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '状态',
  113. PRIMARY KEY (`id`),
  114. UNIQUE KEY `name` (`name`) USING BTREE,
  115. KEY `parentid` (`parentid`),
  116. KEY `listorder` (`listorder`)
  117. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='节点表';
  118. -- ----------------------------
  119. -- Records of yzn_auth_rule
  120. -- ----------------------------
  121. INSERT INTO `yzn_auth_rule` VALUES (1, 0, 'general', '常规管理', 'iconfont icon-setup', '', '', '', 1, NULL, '', 1691377129, 1691377129, 999, 1);
  122. INSERT INTO `yzn_auth_rule` VALUES (2, 0, 'addons', '插件管理', 'iconfont icon-equalizer-line', '', '', '', 1, NULL, '', 1691377129, 1691377129, 777, 1);
  123. INSERT INTO `yzn_auth_rule` VALUES (4, 1, 'general.profile', '个人资料', 'iconfont icon-user-line', '', '', '', 1, NULL, '', 1691377129, 1691377129, 0, 1);
  124. INSERT INTO `yzn_auth_rule` VALUES (5, 4, 'general.profile/index', '查看', '', '', '', '', 0, NULL, '', 1691377129, 1691377129, 0, 1);
  125. INSERT INTO `yzn_auth_rule` VALUES (6, 4, 'general.profile/update', '资料更新', '', '', '', '', 0, NULL, '', 1691377129, 1691377129, 0, 1);
  126. INSERT INTO `yzn_auth_rule` VALUES (10, 1, 'general.config', '配置管理', 'iconfont icon-apartment', '', '', '', 1, NULL, '', 1691377129, 1691377129, 999, 1);
  127. INSERT INTO `yzn_auth_rule` VALUES (11, 1, 'general.config/setting', '网站设置', 'iconfont icon-setup', '', '', '', 1, NULL, '', 1691377129, 1691377129, 888, 1);
  128. INSERT INTO `yzn_auth_rule` VALUES (12, 28, 'auth.rule', '菜单管理', 'iconfont icon-other', '', '', '', 1, NULL, '', 1691377129, 1691377129, 666, 1);
  129. INSERT INTO `yzn_auth_rule` VALUES (13, 1, 'general.attachments', '附件管理', 'iconfont icon-accessory', '', '', '', 1, NULL, '', 1691377129, 1691377129, 666, 1);
  130. INSERT INTO `yzn_auth_rule` VALUES (14, 13, 'general.attachments/index', '查看', '', '', '', '', 0, NULL, '', 1691377129, 1691377129, 0, 1);
  131. INSERT INTO `yzn_auth_rule` VALUES (15, 13, 'general.attachments/del', '删除', '', '', '', '', 0, NULL, '', 1691377129, 1691377129, 0, 1);
  132. INSERT INTO `yzn_auth_rule` VALUES (16, 13, 'general.attachments/getUrlFile', '图片本地化', '', '', '', '', 0, NULL, '', 1691377129, 1691377129, 0, 1);
  133. INSERT INTO `yzn_auth_rule` VALUES (17, 13, 'general.attachments/select', '图片选择', '', '', '', '', 0, NULL, '', 1691377129, 1691377129, 0, 1);
  134. INSERT INTO `yzn_auth_rule` VALUES (18, 12, 'auth.rule/index', '查看', '', '', '', '', 0, NULL, '', 1691377129, 1691377129, 0, 1);
  135. INSERT INTO `yzn_auth_rule` VALUES (19, 12, 'auth.rule/add', '新增', '', '', '', '', 0, NULL, '', 1691377129, 1691377129, 0, 1);
  136. INSERT INTO `yzn_auth_rule` VALUES (20, 12, 'auth.rule/edit', '编辑', '', '', '', '', 0, NULL, '', 1691377129, 1691377129, 0, 1);
  137. INSERT INTO `yzn_auth_rule` VALUES (21, 12, 'auth.rule/del', '删除', '', '', '', '', 0, NULL, '', 1691377129, 1691377129, 0, 1);
  138. INSERT INTO `yzn_auth_rule` VALUES (22, 12, 'auth.rule/multi', '批量更新', '', '', '', '', 0, NULL, '', 1691377129, 1691377129, 0, 1);
  139. INSERT INTO `yzn_auth_rule` VALUES (23, 10, 'general.config/add', '新增', '', '', '', '', 0, NULL, '', 1691377129, 1691377129, 0, 1);
  140. INSERT INTO `yzn_auth_rule` VALUES (24, 10, 'general.config/edit', '编辑', '', '', '', '', 0, NULL, '', 1691377129, 1691377129, 0, 1);
  141. INSERT INTO `yzn_auth_rule` VALUES (25, 10, 'general.config/del', '删除', '', '', '', '', 0, NULL, '', 1691377129, 1691377129, 0, 1);
  142. INSERT INTO `yzn_auth_rule` VALUES (26, 10, 'general.config/multi', '批量更新', '', '', '', '', 0, NULL, '', 1691377129, 1691377129, 0, 1);
  143. INSERT INTO `yzn_auth_rule` VALUES (27, 10, 'general.config/index', '查看', '', '', '', '', 0, NULL, '', 1691377129, 1691377129, 0, 1);
  144. INSERT INTO `yzn_auth_rule` VALUES (28, 0, 'auth', '权限管理', 'iconfont icon-user-settings-line', '', '', '', 1, NULL, '', 1691377129, 1691377129, 888, 1);
  145. INSERT INTO `yzn_auth_rule` VALUES (29, 28, 'auth.manager', '管理员管理', 'iconfont icon-user-settings-line', '', '', '', 1, NULL, '', 1691377129, 1691377129, 999, 1);
  146. INSERT INTO `yzn_auth_rule` VALUES (30, 29, 'auth.manager/index', '查看', '', '', '', '', 0, NULL, '', 1691377129, 1691377129, 0, 1);
  147. INSERT INTO `yzn_auth_rule` VALUES (31, 29, 'auth.manager/edit', '编辑', '', '', '', '', 0, NULL, '', 1691377129, 1691377129, 0, 1);
  148. INSERT INTO `yzn_auth_rule` VALUES (32, 29, 'auth.manager/del', '删除', '', '', '', '', 0, NULL, '', 1691377129, 1691377129, 0, 1);
  149. INSERT INTO `yzn_auth_rule` VALUES (33, 29, 'auth.manager/add', '新增', '', '', '', '', 0, NULL, '', 1691377129, 1691377129, 0, 1);
  150. INSERT INTO `yzn_auth_rule` VALUES (34, 28, 'auth.adminlog', '管理日志', 'iconfont icon-history', '', '', '', 1, NULL, '', 1691377129, 1691377129, 888, 1);
  151. INSERT INTO `yzn_auth_rule` VALUES (35, 34, 'auth.adminlog/index', '查看', '', '', '', '', 0, NULL, '', 1691377129, 1691377129, 0, 1);
  152. INSERT INTO `yzn_auth_rule` VALUES (36, 34, 'auth.adminlog/deletelog', '删除', '', '', '', '', 0, NULL, '', 1691377129, 1691377129, 0, 1);
  153. INSERT INTO `yzn_auth_rule` VALUES (37, 28, 'auth.group', '角色管理', 'iconfont icon-user-shared-2-line', '', '', '', 1, NULL, '', 1691377129, 1691377129, 777, 1);
  154. INSERT INTO `yzn_auth_rule` VALUES (38, 37, 'auth.group/index', '查看', '', '', '', '', 0, NULL, '', 1691377129, 1691377129, 0, 1);
  155. INSERT INTO `yzn_auth_rule` VALUES (39, 37, 'auth.group/add', '新增', '', '', '', '', 0, NULL, '', 1691377129, 1691377129, 0, 1);
  156. INSERT INTO `yzn_auth_rule` VALUES (40, 37, 'auth.group/edit', '编辑', '', '', '', '', 0, NULL, '', 1691377129, 1691377129, 0, 1);
  157. INSERT INTO `yzn_auth_rule` VALUES (41, 37, 'auth.group/del', '删除', '', '', '', '', 0, NULL, '', 1691377129, 1691377129, 0, 1);
  158. INSERT INTO `yzn_auth_rule` VALUES (42, 37, 'auth.group/access', '访问授权', '', '', '', '', 0, NULL, '', 1691377129, 1691377129, 0, 1);
  159. INSERT INTO `yzn_auth_rule` VALUES (45, 2, 'addons/index', '查看', '', '', '', '', 0, NULL, '', 1691377129, 1691377129, 0, 1);
  160. INSERT INTO `yzn_auth_rule` VALUES (46, 2, 'addons/config', '配置', '', '', '', '', 0, NULL, '', 1691377129, 1691377129, 0, 1);
  161. INSERT INTO `yzn_auth_rule` VALUES (49, 2, 'addons/state', '禁用启用', '', '', '', '', 0, NULL, '', 1691377129, 1691377129, 0, 1);
  162. -- ----------------------------
  163. -- Table structure for `yzn_cache`
  164. -- ----------------------------
  165. DROP TABLE IF EXISTS `yzn_cache`;
  166. CREATE TABLE `yzn_cache` (
  167. `id` int(10) NOT NULL AUTO_INCREMENT,
  168. `key` varchar(100) NOT NULL DEFAULT '' COMMENT '缓存KEY值',
  169. `name` varchar(100) NOT NULL DEFAULT '' COMMENT '名称',
  170. `module` varchar(20) NOT NULL DEFAULT '' COMMENT '模块名称',
  171. `model` varchar(30) NOT NULL DEFAULT '' COMMENT '模型名称',
  172. `action` varchar(30) NOT NULL DEFAULT '' COMMENT '方法名',
  173. `system` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否系统',
  174. PRIMARY KEY (`id`),
  175. KEY `ckey` (`key`)
  176. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='缓存列队表';
  177. -- ----------------------------
  178. -- Records of yzn_cache
  179. -- ----------------------------
  180. INSERT INTO `yzn_cache` VALUES (1, 'Model', '模型列表', 'admin', 'Models', 'model_cache', 1);
  181. INSERT INTO `yzn_cache` VALUES (2, 'ModelField', '模型字段', 'admin', 'ModelField', 'model_field_cache', 1);
  182. -- ----------------------------
  183. -- Table structure for `yzn_config`
  184. -- ----------------------------
  185. DROP TABLE IF EXISTS `yzn_config`;
  186. CREATE TABLE `yzn_config` (
  187. `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '配置ID',
  188. `name` varchar(30) NOT NULL DEFAULT '' COMMENT '配置名称',
  189. `type` varchar(32) NOT NULL DEFAULT '' COMMENT '配置类型',
  190. `title` varchar(50) NOT NULL DEFAULT '' COMMENT '配置说明',
  191. `group` varchar(32) NOT NULL DEFAULT '' COMMENT '配置分组',
  192. `options` varchar(255) NOT NULL DEFAULT '' COMMENT '配置项',
  193. `remark` varchar(100) NOT NULL DEFAULT '' COMMENT '配置说明',
  194. `create_time` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
  195. `update_time` int(10) unsigned DEFAULT NULL COMMENT '更新时间',
  196. `status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '状态',
  197. `value` text NULL COMMENT '配置值',
  198. `visible` varchar(255) DEFAULT '' COMMENT '可见条件',
  199. `extend` varchar(255) DEFAULT '' COMMENT '扩展属性',
  200. `listorder` smallint(3) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
  201. PRIMARY KEY (`id`),
  202. UNIQUE KEY `uk_name` (`name`),
  203. KEY `type` (`type`),
  204. KEY `group` (`group`)
  205. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='网站配置';
  206. -- ----------------------------
  207. -- Records of yzn_config
  208. -- ----------------------------
  209. INSERT INTO `yzn_config` VALUES (1, 'web_site_icp', 'text', '备案信息', 'base', '', '', 1551244923, 1551244971, 1, '', '', '',1);
  210. INSERT INTO `yzn_config` VALUES (2, 'web_site_statistics', 'textarea', '站点代码', 'base', '', '', 1551244957, 1551244957, 1, '','', '', 100);
  211. INSERT INTO `yzn_config` VALUES (3, 'config_group', 'array', '配置分组', 'system', '', '', 1494408414, 1494408414, 1, '{\"base\":\"基础\",\"system\":\"系统\",\"upload\":\"上传\",\"develop\":\"开发\"}','', '', 0);
  212. INSERT INTO `yzn_config` VALUES (4, 'theme', 'text', '主题风格', 'system', '', '', 1541752781, 1541756888, 1, 'default', '', '',1);
  213. INSERT INTO `yzn_config` VALUES (5, 'admin_forbid_ip', 'textarea', '后台禁止访问IP', 'system', '', '匹配IP段用\"*\"占位,如192.168.*.*,多个IP地址请用英文逗号\",\"分割', 1551244957, 1551244957, 1, '', '', '',2);
  214. INSERT INTO `yzn_config` VALUES (6, 'upload_image_size', 'text', '图片上传大小限制', 'upload', '', '0为不限制大小,单位:kb', 1540457656, 1552436075, 1, '0', '', '',2);
  215. INSERT INTO `yzn_config` VALUES (7, 'upload_image_ext', 'text', '允许上传图片后缀', 'upload', '', '多个后缀用逗号隔开,不填写则不限制类型', 1540457657, 1552436074, 1, 'gif,jpg,jpeg,bmp,png', '', '',1);
  216. INSERT INTO `yzn_config` VALUES (8, 'upload_file_size', 'text', '文件上传大小限制', 'upload', '', '0为不限制大小,单位:kb', 1540457658, 1552436078, 1, '0', '', '',3);
  217. INSERT INTO `yzn_config` VALUES (9, 'upload_file_ext', 'text', '允许上传文件后缀', 'upload', '', '多个后缀用逗号隔开,不填写则不限制类型', 1540457659, 1552436080, 1, 'doc,docx,xls,xlsx,ppt,pptx,pdf,wps,txt,rar,zip,gz,bz2,7z', '', '',4);
  218. INSERT INTO `yzn_config` VALUES (10, 'upload_driver', 'radio', '上传驱动', 'upload', 'local:本地', '图片或文件上传驱动', 1541752781, 1552436085, 1, 'local', '', '',9);
  219. INSERT INTO `yzn_config` VALUES (11, 'upload_thumb_water', 'switch', '添加水印', 'upload', '', '', 1552435063, 1552436080, 1, '0', '', '',5);
  220. INSERT INTO `yzn_config` VALUES (12, 'upload_thumb_water_pic', 'image', '水印图片', 'upload', '', '只有开启水印功能才生效', 1552435183, 1552436081, 1, '', '', '',6);
  221. INSERT INTO `yzn_config` VALUES (13, 'upload_thumb_water_position', 'radio', '水印位置', 'upload', '1:左上角\r\n2:上居中\r\n3:右上角\r\n4:左居中\r\n5:居中\r\n6:右居中\r\n7:左下角\r\n8:下居中\r\n9:右下角', '只有开启水印功能才生效', 1552435257, 1552436082, 1, '9', '', '',7);
  222. INSERT INTO `yzn_config` VALUES (14, 'upload_thumb_water_alpha', 'text', '水印透明度', 'upload', '', '请输入0~100之间的数字,数字越小,透明度越高', 1552435299, 1552436083, 1, '50', '', '',8);
  223. -- ----------------------------
  224. -- Table structure for `yzn_field_type`
  225. -- ----------------------------
  226. DROP TABLE IF EXISTS `yzn_field_type`;
  227. CREATE TABLE `yzn_field_type` (
  228. `name` varchar(32) NOT NULL COMMENT '字段类型',
  229. `title` varchar(64) NOT NULL DEFAULT '' COMMENT '中文类型名',
  230. `listorder` int(4) NOT NULL DEFAULT '0' COMMENT '排序',
  231. `default_define` varchar(128) NOT NULL DEFAULT '' COMMENT '默认定义',
  232. `ifoption` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否需要设置选项',
  233. `ifstring` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否自由字符',
  234. PRIMARY KEY (`name`),
  235. UNIQUE KEY `name` (`name`)
  236. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='字段类型表';
  237. -- ----------------------------
  238. -- Records of yzn_field_type
  239. -- ----------------------------
  240. INSERT INTO `yzn_field_type` VALUES ('text', '输入框', 1, 'varchar(255) NOT NULL', 0, 1);
  241. INSERT INTO `yzn_field_type` VALUES ('checkbox', '复选框', 2, 'varchar(32) NOT NULL', 1, 0);
  242. INSERT INTO `yzn_field_type` VALUES ('textarea', '多行文本', 3, 'varchar(255) NOT NULL', 0, 1);
  243. INSERT INTO `yzn_field_type` VALUES ('password', '密码', 4, 'varchar(255) NOT NULL', 0, 1);
  244. INSERT INTO `yzn_field_type` VALUES ('radio', '单选按钮', 5, 'char(10) NOT NULL', 1, 0);
  245. INSERT INTO `yzn_field_type` VALUES ('switch', '开关', 6, 'tinyint(2) UNSIGNED NOT NULL', 0, 0);
  246. INSERT INTO `yzn_field_type` VALUES ('array', '数组', 7, 'varchar(512) NOT NULL', 0, 0);
  247. INSERT INTO `yzn_field_type` VALUES ('select', '下拉框', 8, 'char(10) NOT NULL', 1, 0);
  248. INSERT INTO `yzn_field_type` VALUES ('selects', '下拉框(多选)', 9, 'varchar(32) NOT NULL', 1, 0);
  249. INSERT INTO `yzn_field_type` VALUES ('selectpage', '高级下拉框', 10, 'varchar(32) NOT NULL', 1, 0);
  250. INSERT INTO `yzn_field_type` VALUES ('image', '单张图', 11, 'varchar(255) NOT NULL', 0, 0);
  251. INSERT INTO `yzn_field_type` VALUES ('images', '多张图', 12, 'text NOT NULL', 0, 0);
  252. INSERT INTO `yzn_field_type` VALUES ('tags', '标签', 13, 'varchar(255) NOT NULL', 0, 1);
  253. INSERT INTO `yzn_field_type` VALUES ('number', '数字', 14, 'int(10) UNSIGNED NOT NULL', 0, 0);
  254. INSERT INTO `yzn_field_type` VALUES ('datetime', '日期和时间', 15, 'int(10) UNSIGNED NOT NULL', 0, 0);
  255. INSERT INTO `yzn_field_type` VALUES ('datetimerange', '日期和时间区间', 16, 'varchar(100) NOT NULL', 0, 0);
  256. INSERT INTO `yzn_field_type` VALUES ('Ueditor', '百度编辑器', 17, 'mediumtext NOT NULL', 0, 1);
  257. INSERT INTO `yzn_field_type` VALUES ('markdown', 'markdown编辑器', 18, 'mediumtext NOT NULL', 0, 1);
  258. INSERT INTO `yzn_field_type` VALUES ('files', '多文件', 19, 'text NOT NULL', 0, 0);
  259. INSERT INTO `yzn_field_type` VALUES ('file', '单文件', 20, 'varchar(255) NOT NULL', 0, 0);
  260. INSERT INTO `yzn_field_type` VALUES ('color', '颜色值', 21, 'varchar(7) NOT NULL', 0, 0);
  261. INSERT INTO `yzn_field_type` VALUES ('city', '城市地区', 22, 'varchar(255) NOT NULL', 0, 0);
  262. INSERT INTO `yzn_field_type` VALUES ('custom', '自定义', 23, 'text NOT NULL', 1, 0);
  263. -- ----------------------------
  264. -- Table structure for `yzn_model`
  265. -- ----------------------------
  266. DROP TABLE IF EXISTS `yzn_model`;
  267. CREATE TABLE `yzn_model` (
  268. `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  269. `module` varchar(15) NOT NULL DEFAULT '' COMMENT '所属模块',
  270. `name` varchar(30) NOT NULL DEFAULT '' COMMENT '模型名称',
  271. `tablename` varchar(20) NOT NULL DEFAULT '' COMMENT '表名',
  272. `description` varchar(100) NOT NULL DEFAULT '' COMMENT '描述',
  273. `setting` text NOT NULL COMMENT '配置信息',
  274. `type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '模型类别:1-独立表,2-主附表',
  275. `create_time` int(10) unsigned DEFAULT NULL COMMENT '添加时间',
  276. `update_time` int(10) unsigned DEFAULT NULL COMMENT '更新时间',
  277. `listorders` tinyint(3) NOT NULL DEFAULT '0' COMMENT '排序',
  278. `status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '状态',
  279. PRIMARY KEY (`id`)
  280. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='模型列表';
  281. -- ----------------------------
  282. -- Table structure for `yzn_model_field`
  283. -- ----------------------------
  284. DROP TABLE IF EXISTS `yzn_model_field`;
  285. CREATE TABLE `yzn_model_field` (
  286. `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  287. `modelid` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '模型ID',
  288. `name` varchar(20) NOT NULL DEFAULT '' COMMENT '字段名',
  289. `title` varchar(30) NOT NULL DEFAULT '' COMMENT '别名',
  290. `remark` tinytext NULL COMMENT '字段提示',
  291. `pattern` varchar(255) NOT NULL DEFAULT '' COMMENT '数据校验正则',
  292. `errortips` varchar(255) NOT NULL DEFAULT '' COMMENT '数据校验未通过的提示信息',
  293. `type` varchar(20) NOT NULL DEFAULT '' COMMENT '字段类型',
  294. `extend` varchar(255) DEFAULT '' COMMENT '扩展信息',
  295. `setting` mediumtext NULL COMMENT '字段配置',
  296. `ifsystem` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否主表字段 1 是',
  297. `iscore` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否内部字段',
  298. `iffixed` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否固定不可修改',
  299. `ifrequire` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否必填',
  300. `ifsearch` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '作为搜索条件',
  301. `isadd` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '在投稿中显示',
  302. `create_time` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
  303. `update_time` int(10) unsigned DEFAULT NULL COMMENT '更新时间',
  304. `listorder` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
  305. `status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '状态',
  306. PRIMARY KEY (`id`),
  307. KEY `name` (`name`,`modelid`)
  308. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='模型字段列表';
  309. -- ----------------------------
  310. -- Table structure for `yzn_terms`
  311. -- ----------------------------
  312. DROP TABLE IF EXISTS `yzn_terms`;
  313. CREATE TABLE `yzn_terms` (
  314. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '分类ID',
  315. `parentid` smallint(5) NOT NULL DEFAULT '0' COMMENT '父ID',
  316. `name` varchar(20) NOT NULL DEFAULT '' COMMENT '分类名称',
  317. `module` varchar(15) NOT NULL DEFAULT '' COMMENT '所属模块',
  318. `setting` mediumtext NULL COMMENT '相关配置信息',
  319. PRIMARY KEY (`id`),
  320. KEY `name` (`name`),
  321. KEY `module` (`module`)
  322. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='分类表';
  323. -- ----------------------------
  324. -- Table structure for `yzn_sms`
  325. -- ----------------------------
  326. DROP TABLE IF EXISTS `yzn_sms`;
  327. CREATE TABLE `yzn_sms` (
  328. `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  329. `event` varchar(30) NOT NULL DEFAULT '' COMMENT '事件',
  330. `mobile` varchar(20) NOT NULL DEFAULT '' COMMENT '手机号',
  331. `code` varchar(10) NOT NULL DEFAULT '' COMMENT '验证码',
  332. `times` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '验证次数',
  333. `ip` varchar(50) NOT NULL DEFAULT '' COMMENT '操作IP',
  334. `create_time` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
  335. PRIMARY KEY (`id`)
  336. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='短信验证码表';
  337. -- ----------------------------
  338. -- Table structure for `yzn_ems`
  339. -- ----------------------------
  340. DROP TABLE IF EXISTS `yzn_ems`;
  341. CREATE TABLE `yzn_ems` (
  342. `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  343. `event` varchar(30) NOT NULL DEFAULT '' COMMENT '事件',
  344. `email` varchar(100) NOT NULL DEFAULT '' COMMENT '邮箱',
  345. `code` varchar(10) NOT NULL DEFAULT '' COMMENT '验证码',
  346. `times` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '验证次数',
  347. `ip` varchar(50) NOT NULL DEFAULT '' COMMENT '操作IP',
  348. `create_time` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
  349. PRIMARY KEY (`id`)
  350. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT='邮箱验证码表';
  351. SET FOREIGN_KEY_CHECKS = 1;