Implement new file upload and download mechanism

This commit is contained in:
2024-09-08 16:43:50 +07:00
parent 29ab28fd93
commit 72cb594128
8 changed files with 187 additions and 204 deletions

View File

@ -11,12 +11,10 @@ type User struct {
}
type File struct {
ID uuid.UUID `gorm:"primaryKey;not null;unique"`
OwnerID uuid.UUID `gorm:"not null"`
Name string `gorm:"not null"`
Size int64 `gorm:"not null"`
Downloaded int64 `gorm:"not null;default=0"`
UploadedByte int64 `gorm:"not null;default=0"`
UploadedChunk int64 `gorm:"not null;default=0"`
Done bool `gorm:"not null;default=false"`
ID uuid.UUID `gorm:"primaryKey;not null;unique"`
OwnerID uuid.UUID `gorm:"not null"`
Name string `gorm:"not null"`
Size int64 `gorm:"not null"`
TotalChunk int64 `gorm:"not null"`
Downloaded int64 `gorm:"not null;default=0"`
}