2026-04-27 17:49:19 +03:00
|
|
|
package models
|
|
|
|
|
|
2026-04-27 18:01:02 +03:00
|
|
|
const (
|
|
|
|
|
FileStatusFailed = "failed"
|
|
|
|
|
FileStatusReady = "complete"
|
|
|
|
|
FileStatusWait = "pending"
|
|
|
|
|
FileStatusWork = "uploading"
|
|
|
|
|
)
|
|
|
|
|
|
2026-04-27 17:49:19 +03:00
|
|
|
type BoxFile struct {
|
|
|
|
|
ID string `json:"id"`
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
Size int64 `json:"size"`
|
|
|
|
|
SizeLabel string `json:"size_label"`
|
|
|
|
|
MimeType string `json:"mime_type"`
|
|
|
|
|
Status string `json:"status"`
|
|
|
|
|
StatusLabel string `json:"status_label"`
|
|
|
|
|
Title string `json:"title"`
|
|
|
|
|
IconPath string `json:"icon_path"`
|
|
|
|
|
DownloadPath string `json:"download_path"`
|
|
|
|
|
UploadPath string `json:"upload_path"`
|
|
|
|
|
IsComplete bool `json:"is_complete"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type BoxManifest struct {
|
|
|
|
|
Files []BoxFile `json:"files"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type CreateBoxRequest struct {
|
|
|
|
|
Files []CreateBoxFileRequest `json:"files"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type CreateBoxFileRequest struct {
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
Size int64 `json:"size"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type UpdateFileStatusRequest struct {
|
|
|
|
|
Status string `json:"status"`
|
|
|
|
|
}
|