otter-space-sdk/pkg/models/const.go
SoXX 0e6a8fd61e feat(database): added additional columns
added more columns

BREAKING-CHANGE: breaks database compatibility to older SDK versions
2024-08-09 21:37:54 +02:00

55 lines
993 B
Go

package models
import "time"
type (
UserID string
PostID string
SourceID string
SourceDomain string
PostURL string
TagGroupName string
TagAliasName string
TagID string
ScrapeTimeInterval int
UserLastScrapeTime time.Time
TagName string
Rating string
TagType string
UserSourceID string
UserFavoriteID 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"
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
}
}