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