SoXX
c120c583e3
All checks were successful
Gitea Build Check / Build (push) Successful in 2m56s
- added migration - added model
63 lines
980 B
Go
63 lines
980 B
Go
package models
|
|
|
|
import "time"
|
|
|
|
type (
|
|
UserID string
|
|
PostID string
|
|
PostURL string
|
|
PoolID string
|
|
|
|
SourceID string
|
|
SourceDomain string
|
|
|
|
TagName string
|
|
TagGroupName string
|
|
TagAliasName string
|
|
|
|
ScrapeTimeInterval int
|
|
UserLastScrapeTime time.Time
|
|
|
|
Rating string
|
|
TagType string
|
|
|
|
UserSourceID string
|
|
UserFavoriteID string
|
|
)
|
|
|
|
const (
|
|
MaxPageSizeLimit = 100
|
|
DefaultPageSize = 50
|
|
)
|
|
|
|
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
|
|
}
|
|
}
|