449f95d1b5
重构价格管理模块,完全迁移到 GORM ORM
...
- 将价格相关处理函数从原生 SQL 完全迁移到 GORM
- 优化数据库查询逻辑,使用 GORM 的链式查询和更新方法
- 重构价格审核、更新和批量审核功能,使用事务处理
- 简化数据库操作,移除手动 SQL 查询和扫描逻辑
- 优化价格倍率计算方法,提高代码可读性和性能
2025-03-06 23:46:18 +08:00
31f65a9301
优化用户模型 Email 字段长度限制
...
- 为 Email 字段添加 varchar(191) 类型约束
- 确保数据库兼容性和索引性能
2025-03-06 23:37:14 +08:00
aeb05f790a
重构数据库层并迁移到 GORM
...
- 将数据库操作从原生 SQL 迁移到 GORM ORM
- 更新模型定义,添加 GORM 标签和关系
- 移除手动创建表的 SQL 方法,改用 AutoMigrate
- 更新所有数据库相关处理逻辑以适配 GORM
- 升级 Go 版本和依赖库
- 移除数据库和路由中间件,简化项目结构
2025-03-06 23:32:18 +08:00
0bdadcfef7
新增模型类型管理功能
...
- 后端添加模型类型的增删改查接口,并增加管理员权限控制
- 扩展模型类型模型,新增排序字段
- 前端新增模型类型管理页面入口和路由
- 优化模型类型查询,支持按排序字段排序
- 在创建和更新价格时增加模型重复性检查
2025-03-06 23:16:18 +08:00
da79bf3d6d
新增批量审核价格功能并优化前端交互
...
- 后端新增 `/prices/approve-all` 接口,支持管理员一键通过所有待审核价格
- 前端价格管理页面添加"全部通过"按钮,仅对管理员可见
- 优化批量添加价格页面交互,增加行复制和删除按钮
- 调整价格输入为可为空,移除默认值为0的限制
2025-03-06 22:43:30 +08:00
e7e93dc2ad
优化OAuth认证处理逻辑并增加调试日志
...
- 固定OAuth授权、令牌和用户信息URL
- 更新用户信息结构体以匹配新的API响应
- 添加调试日志输出用户信息和角色分配
- 修正用户ID类型为整型
- 优化管理员角色判断逻辑
2025-03-03 23:33:15 +08:00
af82111ae3
修复用户信息结构体中的头像字段名称并更新角色判断逻辑
2025-03-03 23:17:47 +08:00
4cc3387e97
Remove development-mode test login functionality
...
- Strip out hardcoded test user creation and session generation
- Prepare for OAuth 2.0 authentication in production environment
- Simplify login handler to focus on OAuth authentication
2025-02-23 04:55:56 +08:00
b0d0bee061
test
2025-02-23 04:23:57 +08:00
315933d57a
Refactor model type handling and add SQLite support
...
- Update config to include SQLite path for database migration
- Modify model type handlers to use new database schema
- Update frontend to handle new model type key and label fields
- Add database migration script to start process
- Import SQLite driver for potential database usage
2025-02-23 04:23:42 +08:00
330963418e
Remove SQLite migration and related code
2025-02-23 04:03:20 +08:00
c9a9e7b845
Update Price model and migration to use unsigned integer for channel_type
2025-02-23 03:42:38 +08:00
a2932ecf6b
Migrate from SQLite to MySQL: Update database configuration and schema
2025-02-23 03:37:10 +08:00
2efb33fc2f
Enhance provider management and price filtering with model type and ID handling
2025-02-21 12:07:56 +08:00
6fa37f6d6a
Add model type support for pricing management
2025-02-21 11:51:53 +08:00
d4aebb8148
更新 OAuth 相关 URL 以使用新域名,并修改前端链接
2025-02-14 23:59:28 +08:00
50d63f47c7
Add channel type filtering to Prices view and backend API
2025-02-09 19:24:10 +08:00
e852b885c0
Implement pagination and loading states for Prices and Providers views
2025-02-09 18:56:56 +08:00
1d16333e11
Replace "supplier" terminology with "model vendor" across frontend and backend
2025-02-08 21:03:01 +08:00
e7967dfeff
Modify login flow to support dynamic OAuth 2.0 authorization URL
2025-02-08 20:21:39 +08:00
bd8656542b
Migrate authentication from Discourse SSO to OAuth 2.0 authentication flow
2025-02-08 20:07:42 +08:00
8a2aec1ca3
Update authentication cookie settings for domain-specific SSO and redirect
2025-02-08 19:09:17 +08:00
d1f3b5b989
Fix SSO callback URL to use hardcoded HTTPS domain
2025-02-08 18:53:11 +08:00
85f21a3105
Simplify Dockerfile and GitHub Actions workflow for single-stage Docker build
2025-02-08 17:36:33 +08:00
7487aaadda
Remove Deno-specific configuration files and migrate to Cloudflare Workers environment
2025-02-08 17:32:58 +08:00