- 注释掉 OSS预签名 URL 缓存刷新任务的定时执行代码 - 在 hero/hero.go 中增加对 Redis缓存和英雄数据集的非空校验 - 修改 OSS预签名 URL 生成逻辑,自动替换为 CDN 域名
102 lines
3.5 KiB
Go
102 lines
3.5 KiB
Go
// ==========================================================================
|
|
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
|
// ==========================================================================
|
|
|
|
package internal
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/gogf/gf/v2/database/gdb"
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
)
|
|
|
|
// EpicI18NMappingsDao is the data access object for the table epic_i18n_mappings.
|
|
type EpicI18NMappingsDao struct {
|
|
table string // table is the underlying table name of the DAO.
|
|
group string // group is the database configuration group name of the current DAO.
|
|
columns EpicI18NMappingsColumns // columns contains all the column names of Table for convenient usage.
|
|
handlers []gdb.ModelHandler // handlers for customized model modification.
|
|
}
|
|
|
|
// EpicI18NMappingsColumns defines and stores column names for the table epic_i18n_mappings.
|
|
type EpicI18NMappingsColumns struct {
|
|
Id string // 主键ID
|
|
KeyName string // 英文key
|
|
Language string // 语言代码(zh/en/ja/ko等)
|
|
Value string // 翻译值
|
|
Category string // 分类(hero/artifact/role/attribute等)
|
|
Status string // 状态(1:启用 0:禁用)
|
|
Creator string // 创建者
|
|
CreateTime string // 创建时间
|
|
Updater string // 更新者
|
|
UpdateTime string // 更新时间
|
|
Deleted string // 是否删除
|
|
Code string // 编码
|
|
}
|
|
|
|
// epicI18NMappingsColumns holds the columns for the table epic_i18n_mappings.
|
|
var epicI18NMappingsColumns = EpicI18NMappingsColumns{
|
|
Id: "id",
|
|
KeyName: "key_name",
|
|
Language: "language",
|
|
Value: "value",
|
|
Category: "category",
|
|
Status: "status",
|
|
Creator: "creator",
|
|
CreateTime: "create_time",
|
|
Updater: "updater",
|
|
UpdateTime: "update_time",
|
|
Deleted: "deleted",
|
|
Code: "code",
|
|
}
|
|
|
|
// NewEpicI18NMappingsDao creates and returns a new DAO object for table data access.
|
|
func NewEpicI18NMappingsDao(handlers ...gdb.ModelHandler) *EpicI18NMappingsDao {
|
|
return &EpicI18NMappingsDao{
|
|
group: "default",
|
|
table: "epic_i18n_mappings",
|
|
columns: epicI18NMappingsColumns,
|
|
handlers: handlers,
|
|
}
|
|
}
|
|
|
|
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
|
func (dao *EpicI18NMappingsDao) DB() gdb.DB {
|
|
return g.DB(dao.group)
|
|
}
|
|
|
|
// Table returns the table name of the current DAO.
|
|
func (dao *EpicI18NMappingsDao) Table() string {
|
|
return dao.table
|
|
}
|
|
|
|
// Columns returns all column names of the current DAO.
|
|
func (dao *EpicI18NMappingsDao) Columns() EpicI18NMappingsColumns {
|
|
return dao.columns
|
|
}
|
|
|
|
// Group returns the database configuration group name of the current DAO.
|
|
func (dao *EpicI18NMappingsDao) Group() string {
|
|
return dao.group
|
|
}
|
|
|
|
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
|
func (dao *EpicI18NMappingsDao) Ctx(ctx context.Context) *gdb.Model {
|
|
model := dao.DB().Model(dao.table)
|
|
for _, handler := range dao.handlers {
|
|
model = handler(model)
|
|
}
|
|
return model.Safe().Ctx(ctx)
|
|
}
|
|
|
|
// Transaction wraps the transaction logic using function f.
|
|
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
|
// It commits the transaction and returns nil if function f returns nil.
|
|
//
|
|
// Note: Do not commit or roll back the transaction in function f,
|
|
// as it is automatically handled by this function.
|
|
func (dao *EpicI18NMappingsDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
|
return dao.Ctx(ctx).Transaction(ctx, f)
|
|
}
|