2024-02-01 15:26:17 +00:00
|
|
|
package models
|
|
|
|
|
2024-05-04 14:22:58 +00:00
|
|
|
// Account profiles basically fetched from Hydrogen.Passport
|
2024-02-01 15:26:17 +00:00
|
|
|
// But cache at here for better usage
|
|
|
|
// At the same time this model can make relations between local models
|
|
|
|
type Account struct {
|
|
|
|
BaseModel
|
|
|
|
|
2024-05-04 14:22:58 +00:00
|
|
|
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"`
|
2024-05-15 11:45:49 +00:00
|
|
|
Posts []Post `json:"posts" gorm:"foreignKey:AuthorID"`
|
2024-05-04 14:22:58 +00:00
|
|
|
Attachments []Attachment `json:"attachments" gorm:"foreignKey:AuthorID"`
|
|
|
|
Reactions []Reaction `json:"reactions"`
|
|
|
|
ExternalID uint `json:"external_id"`
|
2024-02-01 15:26:17 +00:00
|
|
|
}
|