refactor(config): 更新数据库配置和相关代码

- 将默认数据库从 MySQL 更改为 PostgreSQL
- 更新数据库连接信息和相关设置
- 修改会话前缀为 "blazing:session:"
- 添加 PostgreSQL 驱动支持
- 调整 Pet 模型中的 Data 字段类型从 longtext 改为 text
This commit is contained in:
2025-07-04 19:40:01 +08:00
parent ddfe3e6c2c
commit 56ced5c507
8 changed files with 249 additions and 21 deletions

View File

@@ -11,7 +11,7 @@ const TableNamePet = "pet"
type Pet struct {
*cool.Model
PlayerID uint64 `gorm:"not null;index:idx_pet_by_player_id;comment:'所属玩家ID'" json:"player_id"`
Data string `gorm:"type:longtext;not null;comment:'精灵全部数据'" json:"data"`
Data string `gorm:"type:text;not null;comment:'精灵全部数据'" json:"data"`
}
type PetInfo struct {
CapturePlayerID uint64 `gorm:"not null;comment:'捕获者ID'" json:"capture_player_id"`