feat: 新增养成管理后台
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
package consts
|
||||
|
||||
import (
|
||||
"hotgo/internal/library/dict"
|
||||
"hotgo/internal/model"
|
||||
)
|
||||
|
||||
const (
|
||||
CultivateFlowerOnline = "online"
|
||||
CultivateFlowerOffline = "offline"
|
||||
CultivateFlowerActivityOnly = "activity_only"
|
||||
CultivateFlowerMaintenance = "maintenance"
|
||||
)
|
||||
|
||||
var CultivateFlowerStatusOptions = []*model.Option{
|
||||
dict.GenSuccessOption(CultivateFlowerOnline, "已上架"),
|
||||
dict.GenDefaultOption(CultivateFlowerOffline, "已下架"),
|
||||
dict.GenPrimaryOption(CultivateFlowerActivityOnly, "仅活动"),
|
||||
dict.GenWarningOption(CultivateFlowerMaintenance, "维护中"),
|
||||
}
|
||||
|
||||
var CultivateContentStatusOptions = []*model.Option{
|
||||
dict.GenWarningOption("reviewing", "待审核"),
|
||||
dict.GenSuccessOption("published", "已发布"),
|
||||
dict.GenErrorOption("rejected", "已拒绝"),
|
||||
dict.GenDefaultOption("taken_down", "已下架"),
|
||||
dict.GenDefaultOption("deleted", "已删除"),
|
||||
}
|
||||
|
||||
var CultivateReportStatusOptions = []*model.Option{
|
||||
dict.GenWarningOption("submitted", "待处理"),
|
||||
dict.GenPrimaryOption("processing", "处理中"),
|
||||
dict.GenSuccessOption("resolved", "已处理"),
|
||||
dict.GenDefaultOption("rejected", "已驳回"),
|
||||
}
|
||||
|
||||
var CultivateContentTypeOptions = []*model.Option{
|
||||
dict.GenPrimaryOption("feed_post", "动态"),
|
||||
dict.GenInfoOption("feed_comment", "评论"),
|
||||
}
|
||||
|
||||
var CultivateReportObjectTypeOptions = []*model.Option{
|
||||
dict.GenPrimaryOption("feed_post", "动态"),
|
||||
dict.GenInfoOption("feed_comment", "评论"),
|
||||
dict.GenDefaultOption("user", "用户"),
|
||||
}
|
||||
|
||||
func init() {
|
||||
dict.RegisterEnums("CultivateFlowerStatusOptions", "养成花种状态", CultivateFlowerStatusOptions)
|
||||
dict.RegisterEnums("CultivateContentStatusOptions", "养成内容状态", CultivateContentStatusOptions)
|
||||
dict.RegisterEnums("CultivateReportStatusOptions", "养成举报状态", CultivateReportStatusOptions)
|
||||
dict.RegisterEnums("CultivateContentTypeOptions", "养成内容类型", CultivateContentTypeOptions)
|
||||
dict.RegisterEnums("CultivateReportObjectTypeOptions", "养成举报对象类型", CultivateReportObjectTypeOptions)
|
||||
}
|
||||
Reference in New Issue
Block a user