39 lines
654 B
Go
39 lines
654 B
Go
package models
|
|
|
|
type AnthroveUserID string
|
|
type AnthrovePostID string
|
|
type Rating string
|
|
type TagType string
|
|
|
|
const (
|
|
SFW Rating = "safe"
|
|
NSFW Rating = "explicit"
|
|
Questionable Rating = "questionable"
|
|
Unknown Rating = "unknown"
|
|
)
|
|
|
|
const (
|
|
General TagType = "general"
|
|
Species TagType = "species"
|
|
Character TagType = "character"
|
|
Artist TagType = "artist"
|
|
Lore TagType = "lore"
|
|
Meta TagType = "meta"
|
|
Invalid TagType = "invalid"
|
|
)
|
|
|
|
func (r *Rating) Convert(e621Rating string) {
|
|
|
|
switch e621Rating {
|
|
case "e":
|
|
*r = NSFW
|
|
case "q":
|
|
*r = Questionable
|
|
case "s":
|
|
*r = SFW
|
|
default:
|
|
*r = Unknown
|
|
}
|
|
|
|
}
|