portal/db/models/upload.go

19 lines
283 B
Go
Raw Normal View History

package models
import "gorm.io/gorm"
func init() {
registerModel(&Upload{})
}
type Upload struct {
gorm.Model
2024-01-16 05:53:39 +00:00
UserID uint
2024-03-02 11:19:31 +00:00
Hash []byte `gorm:"type:binary(32);uniqueIndex"`
MimeType string
2024-01-16 05:53:39 +00:00
Protocol string
User User
UploaderIP string
2024-01-16 05:54:32 +00:00
Size uint64
}