Attachment has pool

This commit is contained in:
2024-08-18 14:09:52 +08:00
parent dd0f7399a6
commit a82fb3a49c
11 changed files with 102 additions and 32 deletions

View File

@ -15,11 +15,14 @@ const (
type Attachment struct {
BaseModel
Uuid string `json:"uuid"`
// Random ID is for accessing (appear in URL)
Rid string `json:"rid" gorm:"uniqueIndex"`
// Unique ID is for storing (appear in local file name or object name)
Uuid string `json:"uuid"`
Size int64 `json:"size"`
Name string `json:"name"`
Alternative string `json:"alt"`
Usage string `json:"usage"`
MimeType string `json:"mimetype"`
HashCode string `json:"hash"`
Destination AttachmentDst `json:"destination"`

View File

@ -17,6 +17,8 @@ type AttachmentPool struct {
}
type AttachmentPoolConfig struct {
ExistLifecycle *int `json:"exist_lifecycle"`
IsPublicAccessible bool `json:"is_public_accessible"`
MaxFileSize *int64 `json:"max_file_size"`
ExistLifecycle *int64 `json:"exist_lifecycle"`
AllowCrossPoolIngress bool `json:"allow_cross_pool_ingress"`
AllowCrossPoolEgress bool `json:"allow_cross_pool_egress"`
}