2024-07-19 08:03:35 +00:00
|
|
|
package models
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
2024-08-09 19:37:54 +00:00
|
|
|
type (
|
|
|
|
UserID string
|
|
|
|
PostID string
|
|
|
|
SourceID string
|
|
|
|
SourceDomain string
|
|
|
|
PostURL string
|
|
|
|
TagGroupName string
|
|
|
|
TagAliasName string
|
|
|
|
TagID string
|
|
|
|
ScrapeTimeInterval int
|
|
|
|
UserLastScrapeTime time.Time
|
|
|
|
TagName string
|
2024-07-19 08:03:35 +00:00
|
|
|
|
2024-08-09 19:37:54 +00:00
|
|
|
Rating string
|
|
|
|
TagType string
|
|
|
|
|
|
|
|
UserSourceID string
|
|
|
|
UserFavoriteID string
|
|
|
|
)
|
2024-07-19 08:03:35 +00:00
|
|
|
|
|
|
|
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"
|
|
|
|
Copyright TagType = "copyright"
|
|
|
|
)
|
|
|
|
|
|
|
|
func (r *Rating) Convert(e621Rating string) {
|
|
|
|
switch e621Rating {
|
|
|
|
case "e":
|
|
|
|
*r = NSFW
|
|
|
|
case "q":
|
|
|
|
*r = Questionable
|
|
|
|
case "s":
|
|
|
|
*r = SFW
|
|
|
|
default:
|
|
|
|
*r = Unknown
|
|
|
|
}
|
|
|
|
}
|