feat: migrate to PostgreSQL GORM and MinIO file storage

Use UUID models and soft deletion, persist file relationships with deduplicated monthly MinIO objects, and add admin file management. Update mini-program media handling and add local dev configuration.
This commit is contained in:
2026-11-01 11:48:45 +08:00
parent 0530523750
commit 4934a69581
94 changed files with 4686 additions and 2147 deletions
+13
View File
@@ -0,0 +1,13 @@
// 开发工具使用本机服务;真机调试时把 dev.apiBase 改为电脑的局域网 IP。
const environments = {
dev: { apiBase: 'http://127.0.0.1:8080/api' },
trial: { apiBase: 'https://past.sundynix.cn/api' },
release: { apiBase: 'https://past.sundynix.cn/api' }
};
let version = 'release';
try {
const account = wx.getAccountInfoSync();
version = account.miniProgram.envVersion || 'release';
} catch (e) {}
const env = version === 'develop' ? 'dev' : version === 'trial' ? 'trial' : 'release';
module.exports = { env, API_BASE: environments[env].apiBase };