28 lines
869 B
Go
Raw Normal View History

2024-08-18 12:01:41 +08:00
package models
2024-09-11 23:55:46 +08:00
import (
2024-10-27 13:13:40 +08:00
"git.solsynth.dev/hypernet/nexus/pkg/nex/cruda"
2024-09-11 23:55:46 +08:00
"gorm.io/datatypes"
)
2024-08-18 12:01:41 +08:00
type AttachmentPool struct {
2024-10-27 13:13:40 +08:00
cruda.BaseModel
2024-08-18 12:01:41 +08:00
Alias string `json:"alias"`
Name string `json:"name"`
Description string `json:"description"`
Config datatypes.JSONType[AttachmentPoolConfig] `json:"config"`
2024-08-18 16:02:25 +08:00
Attachments []Attachment `json:"attachments" gorm:"foreignKey:PoolID"`
2024-08-18 12:01:41 +08:00
2024-11-03 01:53:57 +08:00
AccountID *uint `json:"account_id"`
2024-08-18 12:01:41 +08:00
}
type AttachmentPoolConfig struct {
2024-08-18 14:09:52 +08:00
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"`
PublicIndexable bool `json:"public_indexable"`
2024-08-18 12:01:41 +08:00
}