Realm in passport

This commit is contained in:
2024-05-04 01:32:44 +08:00
parent 29a33331e4
commit 5de68bb9b9
7 changed files with 428 additions and 6 deletions

23
pkg/models/realms.go Normal file
View File

@ -0,0 +1,23 @@
package models
type Realm struct {
BaseModel
Alias string `json:"alias" gorm:"uniqueIndex"`
Name string `json:"name"`
Description string `json:"description"`
Members []RealmMember `json:"members"`
IsPublic bool `json:"is_public"`
IsCommunity bool `json:"is_community"`
AccountID uint `json:"account_id"`
}
type RealmMember struct {
BaseModel
RealmID uint `json:"realm_id"`
AccountID uint `json:"account_id"`
Realm Realm `json:"realm"`
Account Account `json:"account"`
PowerLevel int `json:"power_level"`
}