26 lines
416 B
Go
26 lines
416 B
Go
|
package models
|
||
|
|
||
|
import "gorm.io/gorm"
|
||
|
|
||
|
type ImportStatus string
|
||
|
|
||
|
const (
|
||
|
ImportStatusQueued ImportStatus = "queued"
|
||
|
ImportStatusProcessing ImportStatus = "processing"
|
||
|
)
|
||
|
|
||
|
func init() {
|
||
|
registerModel(&Upload{})
|
||
|
}
|
||
|
|
||
|
type Import struct {
|
||
|
gorm.Model
|
||
|
UserID uint
|
||
|
Hash []byte `gorm:"type:binary(32);"`
|
||
|
Protocol string
|
||
|
User User
|
||
|
ImporterIP string
|
||
|
Status ImportStatus
|
||
|
Progress float64
|
||
|
}
|