|
|
@@ -14,18 +14,18 @@ const ( |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
type FileChunk struct { |
|
|
type FileChunk struct { |
|
|
ID int64 `xorm:"pk autoincr"` |
|
|
|
|
|
UUID string `xorm:"uuid UNIQUE"` |
|
|
|
|
|
Md5 string `xorm:"INDEX"` |
|
|
|
|
|
IsUploaded int `xorm:"DEFAULT 0"` // not uploaded: 0, uploaded: 1 |
|
|
|
|
|
UploadID string `xorm:"UNIQUE"` //minio upload id |
|
|
|
|
|
TotalChunks int |
|
|
|
|
|
Size int64 |
|
|
|
|
|
UserID int64 `xorm:"INDEX"` |
|
|
|
|
|
Type int `xorm:"INDEX DEFAULT 0"` |
|
|
|
|
|
CompletedParts []string `xorm:"DEFAULT ''"` // chunkNumber+etag eg: ,1-asqwewqe21312312.2-123hjkas |
|
|
|
|
|
CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"` |
|
|
|
|
|
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"` |
|
|
|
|
|
|
|
|
ID int64 `xorm:"pk autoincr"` |
|
|
|
|
|
UUID string `xorm:"uuid UNIQUE"` |
|
|
|
|
|
Md5 string `xorm:"INDEX"` |
|
|
|
|
|
IsUploaded int `xorm:"DEFAULT 0"` // not uploaded: 0, uploaded: 1 |
|
|
|
|
|
UploadID string `xorm:"UNIQUE"` //minio upload id |
|
|
|
|
|
TotalChunks int |
|
|
|
|
|
Size int64 |
|
|
|
|
|
UserID int64 `xorm:"INDEX"` |
|
|
|
|
|
Type int `xorm:"INDEX DEFAULT 0"` |
|
|
|
|
|
//CompletedParts []string `xorm:"DEFAULT ''"` // chunkNumber+etag eg: ,1-asqwewqe21312312.2-123hjkas |
|
|
|
|
|
CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"` |
|
|
|
|
|
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"` |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// GetFileChunkByMD5 returns fileChunk by given id |
|
|
// GetFileChunkByMD5 returns fileChunk by given id |
|
|
|