多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
~~~[sql] CREATE TABLE `xi_article` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `cate_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '分类ID', `created_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建者ID', `updated_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新者ID', `auditd_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '审核者ID', `identity` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '身份,1=>会员,2=>配送员,3=>商家,4=>平台', `title` varchar(32) NOT NULL DEFAULT '' COMMENT '标题', `thumb` varchar(255) NOT NULL DEFAULT 'http://oss.dgyouduo.com/static/img/no-image.png' COMMENT '缩略图', `banner` varchar(512) NOT NULL DEFAULT 'a:1:{i:0;s:53:"http://oss.dgyouduo.com/static/img/no-image-16x10.png";}' COMMENT '横幅', `summary` varchar(128) NOT NULL DEFAULT '' COMMENT '摘要', `content` text NOT NULL COMMENT '内容', `author` varchar(16) NOT NULL DEFAULT '' COMMENT '作者', `source_name` varchar(16) NOT NULL COMMENT '来源站点', `source_url` varchar(64) NOT NULL COMMENT '来源网址', `view_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '查看次数', `sort` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '排序', `is_audit` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否审核,0=>未审核,1=>审核通过,2=>审核驳回', `is_trash` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '删除,0=>否,1=>是', `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态,0=>禁用,1=>启用', `created_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '创建时间', `updated_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '更新时间', `auditd_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '审核时间', PRIMARY KEY (`id`), UNIQUE KEY `title` (`title`,`cate_id`,`is_trash`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文章'; ~~~ ~~~[sql] CREATE TABLE `xi_article_audit_log` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `article_id` int(11) unsigned NOT NULL COMMENT '文章ID', `admin_id` int(11) unsigned NOT NULL COMMENT '用户ID', `operate` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '操作,1=>审核通过,2=>审核驳回', `is_trash` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '删除,0=>否,1=>是', `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态,0=>禁用,1=>启用', `created_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '创建时间', `updated_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '更新时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文章审核日志'; ~~~ ~~~[sql] CREATE TABLE `xi_article_category` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `parent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '父ID', `parent_id_path` varchar(32) NOT NULL DEFAULT '' COMMENT '父ID路径', `level` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '级别', `identity` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '身份,1=>会员,2=>配送员,3=>商家,4=>平台', `name` varchar(32) NOT NULL DEFAULT '' COMMENT '名称', `thumb` varchar(255) NOT NULL DEFAULT 'http://oss.dgyouduo.com/static/img/no-image.png' COMMENT '缩略图', `sort` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '排序', `is_trash` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '删除,0=>否,1=>是', `status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态,0=>禁用,1=>启用', `created_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '创建时间', `updated_at` int(11) unsigned NOT NULL DEFAULT '1451577600' COMMENT '更新时间', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`,`parent_id`,`identity`,`is_trash`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文章分类'; ~~~