package consts // Style 风格类型 type Style string // 风格常量 const ( StyleBusiness Style = "business" // 商务 StyleCasual Style = "casual" // 休闲 StyleFormal Style = "formal" // 正式 StyleCreative Style = "creative" // 创意 StyleElegant Style = "elegant" // 优雅 StyleFriendly Style = "friendly" // 友好 StyleProfessional Style = "professional" // 专业 StyleUnlimited Style = "unlimited" // 不限 ) // GetStyleText 获取风格文本 func GetStyleText(style string) string { switch style { case string(StyleBusiness): return "商务" case string(StyleCasual): return "休闲" case string(StyleFormal): return "正式" case string(StyleCreative): return "创意" case string(StyleElegant): return "优雅" case string(StyleFriendly): return "友好" case string(StyleProfessional): return "专业" case string(StyleUnlimited): return "不限" default: return "未知" } } // GetAllStyleKeyValue 获取所有风格选项 func GetAllStyleKeyValue() []StyleKeyValue { return []StyleKeyValue{ {Value: string(StyleBusiness), Label: "商务"}, {Value: string(StyleCasual), Label: "休闲"}, {Value: string(StyleFormal), Label: "正式"}, {Value: string(StyleCreative), Label: "创意"}, {Value: string(StyleElegant), Label: "优雅"}, {Value: string(StyleFriendly), Label: "友好"}, {Value: string(StyleProfessional), Label: "专业"}, {Value: string(StyleUnlimited), Label: "不限"}, } } // StyleKeyValue 风格键值对 type StyleKeyValue struct { Value string `json:"value"` Label string `json:"label"` }