Files
YwxAppThink/addon/download/install.sql
T
ywxapp 1d49e6f5ee feat: 公共表更名 common/member 前缀 + 插件命令自动加载 + 版本 1.1.1
- 18 张公共表更名(addon/attachment/configure/links/spider_log/spider_stat/sms/notice/ad/task/prop/medal/help/card -> common_*,member_wallets->member_wallet,score_rule/score_log -> member_*,addon_config->common_addonconf),模型全部对齐新表名,Db 直引用清零
- Attachment 模型补  表名绑定,修复富文本上传查 wxapp_attachment 1146 隐患
- install.sql + 迁移 SQL:backend_admin/backend_role delete_at 默认 0,修复软删除(NULL != 0)误过滤导致后台菜单为空
- AppService::boot() 支持插件 info.php 声明 commands 自动注册插件命令(psr-4 自动加载,坏类名自动跳过)
- 各插件(haonav/mqttbroker/wxchat/articles/blog/forum 等)字段与配置同步调整
- 框架版本 1.1.0 -> 1.1.1
2026-08-20 20:19:15 +08:00

44 lines
2.3 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- 下载站插件安装脚本(前缀硬写 wxapp_download_,与 Addon.php 卸载清单一致)
-- 注意:种子文案禁 -- 注释整段;字符串内禁 \' ,用 '' 转义。
CREATE TABLE IF NOT EXISTS `wxapp_download_category` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`pid` int(11) unsigned NOT NULL DEFAULT 0 COMMENT '父级ID0=一级',
`title` varchar(50) NOT NULL DEFAULT '' COMMENT '分类名',
`cover` varchar(255) NOT NULL DEFAULT '' COMMENT '图标/封面',
`sort` int(11) NOT NULL DEFAULT 0 COMMENT '排序,越大越靠前',
`status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '1=显示 0=隐藏',
`create_at` int(11) NOT NULL DEFAULT 0,
`update_at` int(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `pid` (`pid`),
KEY `status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='下载分类';
CREATE TABLE IF NOT EXISTS `wxapp_download_resource` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`cid` int(11) unsigned NOT NULL DEFAULT 0 COMMENT '分类ID',
`title` varchar(150) NOT NULL DEFAULT '' COMMENT '资源标题',
`cover` varchar(255) NOT NULL DEFAULT '' COMMENT '封面图',
`intro` text COMMENT '简介',
`author` varchar(50) NOT NULL DEFAULT '' COMMENT '作者/出品方',
`version` varchar(30) NOT NULL DEFAULT '' COMMENT '版本号',
`file_size` bigint(20) NOT NULL DEFAULT 0 COMMENT '文件字节数',
`file_url` varchar(500) NOT NULL DEFAULT '' COMMENT '外链地址或本地相对路径',
`is_local` tinyint(1) NOT NULL DEFAULT 0 COMMENT '1=本地存储 0=外链',
`is_free` tinyint(1) NOT NULL DEFAULT 1 COMMENT '1=免费 0=收费',
`price` int(11) NOT NULL DEFAULT 0 COMMENT '所需积分/价格',
`clicks` int(11) unsigned NOT NULL DEFAULT 0 COMMENT '查看次数',
`downloads` int(11) unsigned NOT NULL DEFAULT 0 COMMENT '下载次数',
`status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '1=正常 0=下架',
`is_audit` tinyint(1) NOT NULL DEFAULT 1 COMMENT '1=已审 0=待审',
`source` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0=后台 1=用户投稿',
`create_at` int(11) NOT NULL DEFAULT 0,
`update_at` int(11) NOT NULL DEFAULT 0,
`delete_at` int(11) NOT NULL DEFAULT 0 COMMENT '软删除,0=未删',
PRIMARY KEY (`id`),
KEY `cid` (`cid`),
KEY `status` (`status`),
KEY `is_audit` (`is_audit`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='下载资源';