2024-01-16 01:58:20 +00:00
|
|
|
package models
|
|
|
|
|
|
|
|
import "gorm.io/gorm"
|
|
|
|
|
2024-02-29 02:20:05 +00:00
|
|
|
func init() {
|
|
|
|
registerModel(&Upload{})
|
|
|
|
}
|
|
|
|
|
2024-01-16 01:58:20 +00:00
|
|
|
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"`
|
2024-01-25 23:58:56 +00:00
|
|
|
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
|
2024-01-16 01:58:20 +00:00
|
|
|
}
|