2024-01-19 20:49:41 +00:00
|
|
|
package models
|
|
|
|
|
|
|
|
import "gorm.io/gorm"
|
|
|
|
|
|
|
|
type TusUpload struct {
|
|
|
|
gorm.Model
|
2024-02-18 04:06:27 +00:00
|
|
|
Hash []byte `gorm:"type:binary(32);uniqueIndex:idx_hash_deleted"`
|
2024-01-25 23:58:56 +00:00
|
|
|
MimeType string
|
2024-01-19 20:49:41 +00:00
|
|
|
UploadID string `gorm:"uniqueIndex"`
|
|
|
|
UploaderID uint
|
|
|
|
UploaderIP string
|
|
|
|
Uploader User `gorm:"foreignKey:UploaderID"`
|
|
|
|
Protocol string
|
2024-01-22 22:48:32 +00:00
|
|
|
Completed bool
|
2024-01-21 06:41:04 +00:00
|
|
|
DeletedAt gorm.DeletedAt `gorm:"uniqueIndex:idx_hash_deleted"`
|
2024-01-19 20:49:41 +00:00
|
|
|
}
|