基础项目
Some checks failed
CI / init (pull_request) Has been cancelled
CI / Frontend node 18.16.0 (pull_request) Has been cancelled
CI / Backend go (1.22) (pull_request) Has been cancelled
CI / release-pr (pull_request) Has been cancelled
CI / devops-test (1.22, 18.16.0) (pull_request) Has been cancelled
CI / release-please (pull_request) Has been cancelled
CI / devops-prod (1.22, 18.x) (pull_request) Has been cancelled
CI / docker (pull_request) Has been cancelled

This commit is contained in:
2026-04-26 15:32:21 +08:00
parent cc40d743cb
commit 1e33640629
102 changed files with 4088 additions and 197 deletions

View File

@@ -98,6 +98,35 @@ func (i *initDictDetail) InitializeData(ctx context.Context) (context.Context, e
{Label: "tinyint", Value: "1", Extend: "mysql", Status: &True},
{Label: "bool", Value: "2", Extend: "pgsql", Status: &True},
}
dicts[6].SysDictionaryDetails = []sysModel.SysDictionaryDetail{
{Label: "启用", Value: "enabled", Status: &True, Sort: 10},
{Label: "禁用", Value: "disabled", Status: &True, Sort: 20},
}
dicts[7].SysDictionaryDetails = []sysModel.SysDictionaryDetail{
{Label: "正常", Value: "normal", Status: &True, Sort: 10},
{Label: "隐藏", Value: "hidden", Status: &True, Sort: 20},
}
dicts[8].SysDictionaryDetails = []sysModel.SysDictionaryDetail{
{Label: "完结", Value: "completed", Status: &True, Sort: 10},
{Label: "连载", Value: "serializing", Status: &True, Sort: 20},
}
dicts[9].SysDictionaryDetails = []sysModel.SysDictionaryDetail{
{Label: "未知时代", Value: "unknown", Status: &True, Sort: 10},
{Label: "远古", Value: "ancient", Status: &True, Sort: 20},
{Label: "汉", Value: "han", Status: &True, Sort: 30},
{Label: "唐", Value: "tang", Status: &True, Sort: 40},
{Label: "宋", Value: "song", Status: &True, Sort: 50},
{Label: "元", Value: "yuan", Status: &True, Sort: 60},
{Label: "明", Value: "ming", Status: &True, Sort: 70},
{Label: "清", Value: "qing", Status: &True, Sort: 80},
{Label: "近代", Value: "modern", Status: &True, Sort: 90},
{Label: "现代", Value: "contemporary", Status: &True, Sort: 100},
}
dicts[10].SysDictionaryDetails = []sysModel.SysDictionaryDetail{
{Label: "草稿", Value: "draft", Status: &True, Sort: 10},
{Label: "下架", Value: "off_shelf", Status: &True, Sort: 20},
{Label: "上架", Value: "on_shelf", Status: &True, Sort: 30},
}
for _, dict := range dicts {
if err := db.Model(&dict).Association("SysDictionaryDetails").
Replace(dict.SysDictionaryDetails); err != nil {