go-common/app/interface/main/creative/model/archive/desc.go

34 lines
606 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
package archive
// DescFormat is archive type.
type DescFormat struct {
ID int64 `json:"id"`
Copyright int8 `json:"copyright"`
TypeID int64 `json:"typeid"`
Components string `json:"components"`
Lang int8 `json:"lang"`
}
// AppFormat app format.
type AppFormat struct {
ID int64 `json:"id"`
Copyright int8 `json:"copyright"`
TypeID int64 `json:"typeid"`
}
//ToLang str to int8.
func ToLang(langStr string) (lang int8) {
if langStr == "" {
langStr = "ch"
}
switch langStr {
case "ch":
lang = 0
case "en":
lang = 1
case "jp":
lang = 2
}
return
}