1
0

add member

This commit is contained in:
2023-07-20 23:18:17 +09:00
parent dc01c83e9d
commit 1615c253ba
19 changed files with 2196 additions and 226 deletions

File diff suppressed because it is too large Load Diff

View File

@ -177,6 +177,10 @@ type CardOwnerRead struct {
ID int `json:"id"`
Username string `json:"username"`
Did OptString `json:"did"`
Member OptBool `json:"member"`
Book OptBool `json:"book"`
Manga OptBool `json:"manga"`
Badge OptBool `json:"badge"`
Bsky OptBool `json:"bsky"`
Mastodon OptBool `json:"mastodon"`
Delete OptBool `json:"delete"`
@ -217,6 +221,26 @@ func (s *CardOwnerRead) GetDid() OptString {
return s.Did
}
// GetMember returns the value of Member.
func (s *CardOwnerRead) GetMember() OptBool {
return s.Member
}
// GetBook returns the value of Book.
func (s *CardOwnerRead) GetBook() OptBool {
return s.Book
}
// GetManga returns the value of Manga.
func (s *CardOwnerRead) GetManga() OptBool {
return s.Manga
}
// GetBadge returns the value of Badge.
func (s *CardOwnerRead) GetBadge() OptBool {
return s.Badge
}
// GetBsky returns the value of Bsky.
func (s *CardOwnerRead) GetBsky() OptBool {
return s.Bsky
@ -347,6 +371,26 @@ func (s *CardOwnerRead) SetDid(val OptString) {
s.Did = val
}
// SetMember sets the value of Member.
func (s *CardOwnerRead) SetMember(val OptBool) {
s.Member = val
}
// SetBook sets the value of Book.
func (s *CardOwnerRead) SetBook(val OptBool) {
s.Book = val
}
// SetManga sets the value of Manga.
func (s *CardOwnerRead) SetManga(val OptBool) {
s.Manga = val
}
// SetBadge sets the value of Badge.
func (s *CardOwnerRead) SetBadge(val OptBool) {
s.Badge = val
}
// SetBsky sets the value of Bsky.
func (s *CardOwnerRead) SetBsky(val OptBool) {
s.Bsky = val
@ -771,6 +815,10 @@ func (s *CreateGroupReq) SetUsers(val []int) {
type CreateUserReq struct {
Username string `json:"username"`
Did OptString `json:"did"`
Member OptBool `json:"member"`
Book OptBool `json:"book"`
Manga OptBool `json:"manga"`
Badge OptBool `json:"badge"`
Bsky OptBool `json:"bsky"`
Mastodon OptBool `json:"mastodon"`
Delete OptBool `json:"delete"`
@ -809,6 +857,26 @@ func (s *CreateUserReq) GetDid() OptString {
return s.Did
}
// GetMember returns the value of Member.
func (s *CreateUserReq) GetMember() OptBool {
return s.Member
}
// GetBook returns the value of Book.
func (s *CreateUserReq) GetBook() OptBool {
return s.Book
}
// GetManga returns the value of Manga.
func (s *CreateUserReq) GetManga() OptBool {
return s.Manga
}
// GetBadge returns the value of Badge.
func (s *CreateUserReq) GetBadge() OptBool {
return s.Badge
}
// GetBsky returns the value of Bsky.
func (s *CreateUserReq) GetBsky() OptBool {
return s.Bsky
@ -949,6 +1017,26 @@ func (s *CreateUserReq) SetDid(val OptString) {
s.Did = val
}
// SetMember sets the value of Member.
func (s *CreateUserReq) SetMember(val OptBool) {
s.Member = val
}
// SetBook sets the value of Book.
func (s *CreateUserReq) SetBook(val OptBool) {
s.Book = val
}
// SetManga sets the value of Manga.
func (s *CreateUserReq) SetManga(val OptBool) {
s.Manga = val
}
// SetBadge sets the value of Badge.
func (s *CreateUserReq) SetBadge(val OptBool) {
s.Badge = val
}
// SetBsky sets the value of Bsky.
func (s *CreateUserReq) SetBsky(val OptBool) {
s.Bsky = val
@ -1215,6 +1303,10 @@ type GroupUsersList struct {
ID int `json:"id"`
Username string `json:"username"`
Did OptString `json:"did"`
Member OptBool `json:"member"`
Book OptBool `json:"book"`
Manga OptBool `json:"manga"`
Badge OptBool `json:"badge"`
Bsky OptBool `json:"bsky"`
Mastodon OptBool `json:"mastodon"`
Delete OptBool `json:"delete"`
@ -1255,6 +1347,26 @@ func (s *GroupUsersList) GetDid() OptString {
return s.Did
}
// GetMember returns the value of Member.
func (s *GroupUsersList) GetMember() OptBool {
return s.Member
}
// GetBook returns the value of Book.
func (s *GroupUsersList) GetBook() OptBool {
return s.Book
}
// GetManga returns the value of Manga.
func (s *GroupUsersList) GetManga() OptBool {
return s.Manga
}
// GetBadge returns the value of Badge.
func (s *GroupUsersList) GetBadge() OptBool {
return s.Badge
}
// GetBsky returns the value of Bsky.
func (s *GroupUsersList) GetBsky() OptBool {
return s.Bsky
@ -1385,6 +1497,26 @@ func (s *GroupUsersList) SetDid(val OptString) {
s.Did = val
}
// SetMember sets the value of Member.
func (s *GroupUsersList) SetMember(val OptBool) {
s.Member = val
}
// SetBook sets the value of Book.
func (s *GroupUsersList) SetBook(val OptBool) {
s.Book = val
}
// SetManga sets the value of Manga.
func (s *GroupUsersList) SetManga(val OptBool) {
s.Manga = val
}
// SetBadge sets the value of Badge.
func (s *GroupUsersList) SetBadge(val OptBool) {
s.Badge = val
}
// SetBsky sets the value of Bsky.
func (s *GroupUsersList) SetBsky(val OptBool) {
s.Bsky = val
@ -1922,6 +2054,7 @@ func (*R500) updateGroupRes() {}
func (*R500) updateUserRes() {}
type UpdateCardReq struct {
Card OptInt `json:"card"`
Skill OptString `json:"skill"`
Status OptString `json:"status"`
Token OptString `json:"token"`
@ -1929,6 +2062,11 @@ type UpdateCardReq struct {
Owner OptInt `json:"owner"`
}
// GetCard returns the value of Card.
func (s *UpdateCardReq) GetCard() OptInt {
return s.Card
}
// GetSkill returns the value of Skill.
func (s *UpdateCardReq) GetSkill() OptString {
return s.Skill
@ -1954,6 +2092,11 @@ func (s *UpdateCardReq) GetOwner() OptInt {
return s.Owner
}
// SetCard sets the value of Card.
func (s *UpdateCardReq) SetCard(val OptInt) {
s.Card = val
}
// SetSkill sets the value of Skill.
func (s *UpdateCardReq) SetSkill(val OptString) {
s.Skill = val
@ -2006,6 +2149,10 @@ func (s *UpdateGroupReq) SetUsers(val []int) {
type UpdateUserReq struct {
Did OptString `json:"did"`
Member OptBool `json:"member"`
Book OptBool `json:"book"`
Manga OptBool `json:"manga"`
Badge OptBool `json:"badge"`
Bsky OptBool `json:"bsky"`
Mastodon OptBool `json:"mastodon"`
Delete OptBool `json:"delete"`
@ -2037,6 +2184,26 @@ func (s *UpdateUserReq) GetDid() OptString {
return s.Did
}
// GetMember returns the value of Member.
func (s *UpdateUserReq) GetMember() OptBool {
return s.Member
}
// GetBook returns the value of Book.
func (s *UpdateUserReq) GetBook() OptBool {
return s.Book
}
// GetManga returns the value of Manga.
func (s *UpdateUserReq) GetManga() OptBool {
return s.Manga
}
// GetBadge returns the value of Badge.
func (s *UpdateUserReq) GetBadge() OptBool {
return s.Badge
}
// GetBsky returns the value of Bsky.
func (s *UpdateUserReq) GetBsky() OptBool {
return s.Bsky
@ -2162,6 +2329,26 @@ func (s *UpdateUserReq) SetDid(val OptString) {
s.Did = val
}
// SetMember sets the value of Member.
func (s *UpdateUserReq) SetMember(val OptBool) {
s.Member = val
}
// SetBook sets the value of Book.
func (s *UpdateUserReq) SetBook(val OptBool) {
s.Book = val
}
// SetManga sets the value of Manga.
func (s *UpdateUserReq) SetManga(val OptBool) {
s.Manga = val
}
// SetBadge sets the value of Badge.
func (s *UpdateUserReq) SetBadge(val OptBool) {
s.Badge = val
}
// SetBsky sets the value of Bsky.
func (s *UpdateUserReq) SetBsky(val OptBool) {
s.Bsky = val
@ -2368,6 +2555,10 @@ type UserCreate struct {
ID int `json:"id"`
Username string `json:"username"`
Did OptString `json:"did"`
Member OptBool `json:"member"`
Book OptBool `json:"book"`
Manga OptBool `json:"manga"`
Badge OptBool `json:"badge"`
Bsky OptBool `json:"bsky"`
Mastodon OptBool `json:"mastodon"`
Delete OptBool `json:"delete"`
@ -2408,6 +2599,26 @@ func (s *UserCreate) GetDid() OptString {
return s.Did
}
// GetMember returns the value of Member.
func (s *UserCreate) GetMember() OptBool {
return s.Member
}
// GetBook returns the value of Book.
func (s *UserCreate) GetBook() OptBool {
return s.Book
}
// GetManga returns the value of Manga.
func (s *UserCreate) GetManga() OptBool {
return s.Manga
}
// GetBadge returns the value of Badge.
func (s *UserCreate) GetBadge() OptBool {
return s.Badge
}
// GetBsky returns the value of Bsky.
func (s *UserCreate) GetBsky() OptBool {
return s.Bsky
@ -2538,6 +2749,26 @@ func (s *UserCreate) SetDid(val OptString) {
s.Did = val
}
// SetMember sets the value of Member.
func (s *UserCreate) SetMember(val OptBool) {
s.Member = val
}
// SetBook sets the value of Book.
func (s *UserCreate) SetBook(val OptBool) {
s.Book = val
}
// SetManga sets the value of Manga.
func (s *UserCreate) SetManga(val OptBool) {
s.Manga = val
}
// SetBadge sets the value of Badge.
func (s *UserCreate) SetBadge(val OptBool) {
s.Badge = val
}
// SetBsky sets the value of Bsky.
func (s *UserCreate) SetBsky(val OptBool) {
s.Bsky = val
@ -2660,6 +2891,10 @@ type UserList struct {
ID int `json:"id"`
Username string `json:"username"`
Did OptString `json:"did"`
Member OptBool `json:"member"`
Book OptBool `json:"book"`
Manga OptBool `json:"manga"`
Badge OptBool `json:"badge"`
Bsky OptBool `json:"bsky"`
Mastodon OptBool `json:"mastodon"`
Delete OptBool `json:"delete"`
@ -2700,6 +2935,26 @@ func (s *UserList) GetDid() OptString {
return s.Did
}
// GetMember returns the value of Member.
func (s *UserList) GetMember() OptBool {
return s.Member
}
// GetBook returns the value of Book.
func (s *UserList) GetBook() OptBool {
return s.Book
}
// GetManga returns the value of Manga.
func (s *UserList) GetManga() OptBool {
return s.Manga
}
// GetBadge returns the value of Badge.
func (s *UserList) GetBadge() OptBool {
return s.Badge
}
// GetBsky returns the value of Bsky.
func (s *UserList) GetBsky() OptBool {
return s.Bsky
@ -2830,6 +3085,26 @@ func (s *UserList) SetDid(val OptString) {
s.Did = val
}
// SetMember sets the value of Member.
func (s *UserList) SetMember(val OptBool) {
s.Member = val
}
// SetBook sets the value of Book.
func (s *UserList) SetBook(val OptBool) {
s.Book = val
}
// SetManga sets the value of Manga.
func (s *UserList) SetManga(val OptBool) {
s.Manga = val
}
// SetBadge sets the value of Badge.
func (s *UserList) SetBadge(val OptBool) {
s.Badge = val
}
// SetBsky sets the value of Bsky.
func (s *UserList) SetBsky(val OptBool) {
s.Bsky = val
@ -2950,6 +3225,10 @@ type UserRead struct {
ID int `json:"id"`
Username string `json:"username"`
Did OptString `json:"did"`
Member OptBool `json:"member"`
Book OptBool `json:"book"`
Manga OptBool `json:"manga"`
Badge OptBool `json:"badge"`
Bsky OptBool `json:"bsky"`
Mastodon OptBool `json:"mastodon"`
Delete OptBool `json:"delete"`
@ -2990,6 +3269,26 @@ func (s *UserRead) GetDid() OptString {
return s.Did
}
// GetMember returns the value of Member.
func (s *UserRead) GetMember() OptBool {
return s.Member
}
// GetBook returns the value of Book.
func (s *UserRead) GetBook() OptBool {
return s.Book
}
// GetManga returns the value of Manga.
func (s *UserRead) GetManga() OptBool {
return s.Manga
}
// GetBadge returns the value of Badge.
func (s *UserRead) GetBadge() OptBool {
return s.Badge
}
// GetBsky returns the value of Bsky.
func (s *UserRead) GetBsky() OptBool {
return s.Bsky
@ -3120,6 +3419,26 @@ func (s *UserRead) SetDid(val OptString) {
s.Did = val
}
// SetMember sets the value of Member.
func (s *UserRead) SetMember(val OptBool) {
s.Member = val
}
// SetBook sets the value of Book.
func (s *UserRead) SetBook(val OptBool) {
s.Book = val
}
// SetManga sets the value of Manga.
func (s *UserRead) SetManga(val OptBool) {
s.Manga = val
}
// SetBadge sets the value of Badge.
func (s *UserRead) SetBadge(val OptBool) {
s.Badge = val
}
// SetBsky sets the value of Bsky.
func (s *UserRead) SetBsky(val OptBool) {
s.Bsky = val
@ -3242,6 +3561,10 @@ type UserUpdate struct {
ID int `json:"id"`
Username string `json:"username"`
Did OptString `json:"did"`
Member OptBool `json:"member"`
Book OptBool `json:"book"`
Manga OptBool `json:"manga"`
Badge OptBool `json:"badge"`
Bsky OptBool `json:"bsky"`
Mastodon OptBool `json:"mastodon"`
Delete OptBool `json:"delete"`
@ -3282,6 +3605,26 @@ func (s *UserUpdate) GetDid() OptString {
return s.Did
}
// GetMember returns the value of Member.
func (s *UserUpdate) GetMember() OptBool {
return s.Member
}
// GetBook returns the value of Book.
func (s *UserUpdate) GetBook() OptBool {
return s.Book
}
// GetManga returns the value of Manga.
func (s *UserUpdate) GetManga() OptBool {
return s.Manga
}
// GetBadge returns the value of Badge.
func (s *UserUpdate) GetBadge() OptBool {
return s.Badge
}
// GetBsky returns the value of Bsky.
func (s *UserUpdate) GetBsky() OptBool {
return s.Bsky
@ -3412,6 +3755,26 @@ func (s *UserUpdate) SetDid(val OptString) {
s.Did = val
}
// SetMember sets the value of Member.
func (s *UserUpdate) SetMember(val OptBool) {
s.Member = val
}
// SetBook sets the value of Book.
func (s *UserUpdate) SetBook(val OptBool) {
s.Book = val
}
// SetManga sets the value of Manga.
func (s *UserUpdate) SetManga(val OptBool) {
s.Manga = val
}
// SetBadge sets the value of Badge.
func (s *UserUpdate) SetBadge(val OptBool) {
s.Badge = val
}
// SetBsky sets the value of Bsky.
func (s *UserUpdate) SetBsky(val OptBool) {
s.Bsky = val

View File

@ -140,6 +140,9 @@ func (h *OgentHandler) UpdateCard(ctx context.Context, req *UpdateCardReq, param
if v, ok := req.Cp.Get(); ok {
b.SetCp(v)
}
if v, ok := req.Card.Get(); ok {
b.SetCard(v)
}
if v, ok := req.Owner.Get(); ok {
b.SetOwnerID(v)
}
@ -499,7 +502,18 @@ func (h *OgentHandler) CreateUser(ctx context.Context, req *CreateUserReq) (Crea
if v, ok := req.Mastodon.Get(); ok {
b.SetMastodon(v)
}
if v, ok := req.Member.Get(); ok {
b.SetMember(v)
}
if v, ok := req.Book.Get(); ok {
b.SetBook(v)
}
if v, ok := req.Manga.Get(); ok {
b.SetManga(v)
}
if v, ok := req.Badge.Get(); ok {
b.SetBadge(v)
}
if v, ok := req.Delete.Get(); ok {
b.SetDelete(v)
}
@ -636,6 +650,18 @@ func (h *OgentHandler) UpdateUser(ctx context.Context, req *UpdateUserReq, param
if v, ok := req.Did.Get(); ok {
b.SetDid(v)
}
if v, ok := req.Member.Get(); ok {
b.SetMember(v)
}
if v, ok := req.Book.Get(); ok {
b.SetBook(v)
}
if v, ok := req.Manga.Get(); ok {
b.SetManga(v)
}
if v, ok := req.Badge.Get(); ok {
b.SetBadge(v)
}
if v, ok := req.Bsky.Get(); ok {
b.SetBsky(v)
}

View File

@ -144,6 +144,10 @@ func NewCardOwnerRead(e *ent.User) *CardOwnerRead {
ret.ID = e.ID
ret.Username = e.Username
ret.Did = NewOptString(e.Did)
ret.Member = NewOptBool(e.Member)
ret.Book = NewOptBool(e.Book)
ret.Manga = NewOptBool(e.Manga)
ret.Badge = NewOptBool(e.Badge)
ret.Bsky = NewOptBool(e.Bsky)
ret.Mastodon = NewOptBool(e.Mastodon)
ret.Delete = NewOptBool(e.Delete)
@ -308,6 +312,10 @@ func NewGroupUsersList(e *ent.User) *GroupUsersList {
ret.ID = e.ID
ret.Username = e.Username
ret.Did = NewOptString(e.Did)
ret.Member = NewOptBool(e.Member)
ret.Book = NewOptBool(e.Book)
ret.Manga = NewOptBool(e.Manga)
ret.Badge = NewOptBool(e.Badge)
ret.Bsky = NewOptBool(e.Bsky)
ret.Mastodon = NewOptBool(e.Mastodon)
ret.Delete = NewOptBool(e.Delete)
@ -360,6 +368,10 @@ func NewUserCreate(e *ent.User) *UserCreate {
ret.ID = e.ID
ret.Username = e.Username
ret.Did = NewOptString(e.Did)
ret.Member = NewOptBool(e.Member)
ret.Book = NewOptBool(e.Book)
ret.Manga = NewOptBool(e.Manga)
ret.Badge = NewOptBool(e.Badge)
ret.Bsky = NewOptBool(e.Bsky)
ret.Mastodon = NewOptBool(e.Mastodon)
ret.Delete = NewOptBool(e.Delete)
@ -412,6 +424,10 @@ func NewUserList(e *ent.User) *UserList {
ret.ID = e.ID
ret.Username = e.Username
ret.Did = NewOptString(e.Did)
ret.Member = NewOptBool(e.Member)
ret.Book = NewOptBool(e.Book)
ret.Manga = NewOptBool(e.Manga)
ret.Badge = NewOptBool(e.Badge)
ret.Bsky = NewOptBool(e.Bsky)
ret.Mastodon = NewOptBool(e.Mastodon)
ret.Delete = NewOptBool(e.Delete)
@ -464,6 +480,10 @@ func NewUserRead(e *ent.User) *UserRead {
ret.ID = e.ID
ret.Username = e.Username
ret.Did = NewOptString(e.Did)
ret.Member = NewOptBool(e.Member)
ret.Book = NewOptBool(e.Book)
ret.Manga = NewOptBool(e.Manga)
ret.Badge = NewOptBool(e.Badge)
ret.Bsky = NewOptBool(e.Bsky)
ret.Mastodon = NewOptBool(e.Mastodon)
ret.Delete = NewOptBool(e.Delete)
@ -516,6 +536,10 @@ func NewUserUpdate(e *ent.User) *UserUpdate {
ret.ID = e.ID
ret.Username = e.Username
ret.Did = NewOptString(e.Did)
ret.Member = NewOptBool(e.Member)
ret.Book = NewOptBool(e.Book)
ret.Manga = NewOptBool(e.Manga)
ret.Badge = NewOptBool(e.Badge)
ret.Bsky = NewOptBool(e.Bsky)
ret.Mastodon = NewOptBool(e.Mastodon)
ret.Delete = NewOptBool(e.Delete)