fix(upload): 分片上传 - 先预留配额并原子提交容量 (#679)
Co-authored-by: ddcat666 <26564566+ddcat666@users.noreply.github.com>
This commit is contained in:
1 parent
3698249254
commit
9bc255467d
16 files changed
+661
-36
No files matched your search
@@ -0,0 +1,13 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
// UploadReservation survives process restarts; expiry, not process ownership,
|
||||
// bounds its lifetime. Day records the UTC quota bucket charged at admission.
|
||||
type UploadReservation struct {
|
||||
ID string `gorm:"primaryKey;size:64"`
|
||||
UserID string `gorm:"index;size:64;not null"`
|
||||
Size int64 `gorm:"not null"`
|
||||
Day string `gorm:"size:10;not null"`
|
||||
ExpiresAt time.Time `gorm:"index;not null"`
|
||||
}
|
||||
Reference in new issue
Block a user