✨ Attachment pool basis
This commit is contained in:
@ -6,13 +6,15 @@ package models
|
||||
type Account struct {
|
||||
BaseModel
|
||||
|
||||
Name string `json:"name"`
|
||||
Nick string `json:"nick"`
|
||||
Avatar string `json:"avatar"`
|
||||
Banner string `json:"banner"`
|
||||
Description string `json:"description"`
|
||||
EmailAddress string `json:"email_address"`
|
||||
PowerLevel int `json:"power_level"`
|
||||
Attachments []Attachment `json:"attachments"`
|
||||
ExternalID uint `json:"external_id"`
|
||||
Name string `json:"name"`
|
||||
Nick string `json:"nick"`
|
||||
Avatar string `json:"avatar"`
|
||||
Banner string `json:"banner"`
|
||||
Description string `json:"description"`
|
||||
EmailAddress string `json:"email_address"`
|
||||
PowerLevel int `json:"power_level"`
|
||||
ExternalID uint `json:"external_id"`
|
||||
|
||||
Attachments []Attachment `json:"attachments"`
|
||||
Pools []AttachmentPool `json:"pools"`
|
||||
}
|
||||
|
@ -1,6 +1,9 @@
|
||||
package models
|
||||
|
||||
import "gorm.io/datatypes"
|
||||
import (
|
||||
"gorm.io/datatypes"
|
||||
"time"
|
||||
)
|
||||
|
||||
type AttachmentDst = int8
|
||||
|
||||
@ -22,6 +25,8 @@ type Attachment struct {
|
||||
Destination AttachmentDst `json:"destination"`
|
||||
RefCount int `json:"ref_count"`
|
||||
|
||||
CleanedAt *time.Time `json:"cleaned_at"`
|
||||
|
||||
Metadata datatypes.JSONMap `json:"metadata"`
|
||||
IsMature bool `json:"is_mature"`
|
||||
IsAnalyzed bool `json:"is_analyzed"`
|
||||
@ -30,6 +35,9 @@ type Attachment struct {
|
||||
Ref *Attachment `json:"ref"`
|
||||
RefID *uint `json:"ref_id"`
|
||||
|
||||
Pool *AttachmentPool `json:"pool"`
|
||||
PoolID *uint `json:"pool_id"`
|
||||
|
||||
Account Account `json:"account"`
|
||||
AccountID uint `json:"account_id"`
|
||||
}
|
||||
|
@ -1,4 +0,0 @@
|
||||
package models
|
||||
|
||||
type MediaMetadata struct {
|
||||
}
|
22
pkg/internal/models/pools.go
Normal file
22
pkg/internal/models/pools.go
Normal file
@ -0,0 +1,22 @@
|
||||
package models
|
||||
|
||||
import "gorm.io/datatypes"
|
||||
|
||||
type AttachmentPool struct {
|
||||
BaseModel
|
||||
|
||||
Alias string `json:"alias"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Config datatypes.JSONType[AttachmentPoolConfig] `json:"config"`
|
||||
|
||||
Attachments []Attachment `json:"attachments"`
|
||||
|
||||
Account *Account `json:"account"`
|
||||
AccountID *uint `json:"account_id"`
|
||||
}
|
||||
|
||||
type AttachmentPoolConfig struct {
|
||||
ExistLifecycle *int `json:"exist_lifecycle"`
|
||||
IsPublicAccessible bool `json:"is_public_accessible"`
|
||||
}
|
Reference in New Issue
Block a user