Paperclip/pkg/internal/models/stickers.go

28 lines
728 B
Go
Raw Permalink Normal View History

2024-08-03 07:43:15 +00:00
package models
2024-10-27 05:13:40 +00:00
import (
"git.solsynth.dev/hypernet/nexus/pkg/nex/cruda"
)
2024-09-11 15:55:46 +00:00
2024-08-03 07:43:15 +00:00
type Sticker struct {
2024-10-27 05:13:40 +00:00
cruda.BaseModel
2024-08-03 07:43:15 +00:00
Alias string `json:"alias"`
Name string `json:"name"`
AttachmentID uint `json:"attachment_id"`
Attachment Attachment `json:"attachment"`
PackID uint `json:"pack_id"`
Pack StickerPack `json:"pack"`
AccountID uint `json:"account_id"`
}
type StickerPack struct {
2024-10-27 05:13:40 +00:00
cruda.BaseModel
2024-08-03 07:43:15 +00:00
Prefix string `json:"prefix"`
Name string `json:"name"`
Description string `json:"description"`
Stickers []Sticker `json:"stickers" gorm:"foreignKey:PackID;constraint:OnDelete:CASCADE"`
2024-08-03 07:43:15 +00:00
AccountID uint `json:"account_id"`
}