Interactive/pkg/models/realms.go

31 lines
659 B
Go
Raw Normal View History

2024-02-02 15:42:42 +00:00
package models
2024-03-17 14:08:33 +00:00
type RealmType = int
const (
RealmTypePublic = RealmType(iota)
RealmTypeRestricted
RealmTypePrivate
)
2024-02-02 15:42:42 +00:00
type Realm struct {
BaseModel
2024-02-09 04:36:39 +00:00
Name string `json:"name"`
Description string `json:"description"`
2024-03-02 17:23:11 +00:00
Articles []Article `json:"article"`
Moments []Moment `json:"moments"`
2024-02-09 04:36:39 +00:00
Members []RealmMember `json:"members"`
2024-03-17 14:08:33 +00:00
RealmType RealmType `json:"realm_type"`
2024-02-09 04:36:39 +00:00
AccountID uint `json:"account_id"`
}
type RealmMember struct {
BaseModel
2024-03-23 05:05:05 +00:00
RealmID uint `json:"realm_id"`
AccountID uint `json:"account_id"`
Realm Realm `json:"realm"`
Account Account `json:"account"`
2024-02-02 15:42:42 +00:00
}