This commit is contained in:
2024-08-28 13:14:10 +07:00
parent d976bb4a59
commit caeeb437ee
8 changed files with 41 additions and 27 deletions

View File

@ -10,10 +10,18 @@ type Race struct {
Hash string `gorm:"column:hash;type:varchar(50)" form:"hash" json:"hash" binding:"max=50"`
TorrentName string `gorm:"column:torrent_name;varchar(100);not null" form:"torrent_name" json:"torrent_name" binding:"required,max=100"`
Category string `gorm:"column:category;varchar(50);not null" form:"category" json:"category" binding:"max=50"`
ContentPath string `gorm:"column:content_path;varchar(100);not null" form:"content_path" json:"content_path" binding:"max=100"`
RootPath string `gorm:"column:root_path;varchar(100)" form:"root_path" json:"root_path" binding:"max=100"`
Size string `gorm:"column:size;varchar(15)" form:"size" json:"size" binding:"max=15"`
Indexer string `gorm:"column:indexer;varchar(20);not null" form:"indexer" json:"indexer" binding:"max=20"`
Type string `gorm:"column:type;varchar(20)" form:"type" json:"type" binding:"max=20"`
Title string `gorm:"column:title;varchar(20)" form:"title" json:"title" binding:"max=20"`
Season string `gorm:"column:season;varchar(2)" form:"season" json:"season" binding:"max=2"`
Episode string `gorm:"column:episode;varchar(4)" form:"episode" json:"episode" binding:"max=4"`
Year string `gorm:"column:year;varchar(4)" form:"year" json:"year" binding:"max=4"`
Resolution string `gorm:"column:resolution;varchar(20)" form:"resolution" json:"resolution" binding:"max=20"`
Source string `gorm:"column:source;varchar(20)" form:"source" json:"source" binding:"max=20"`
HDR string `gorm:"column:hdr;varchar(20)" form:"hdr" json:"hdr" binding:"max=20"`
TorrentURL string `gorm:"column:torrenturl;varchar(20);not null" form:"torrenturl" json:"torrenturl" binding:"max=20"`
Won bool `gorm:"column:won;bool" form:"won" json:"won"`
PreRace bool `gorm:"column:prerace;bool" form:"prerace" json:"prerace"`
}
func NewRace() *Race {