traPtitech / Jomon

Account Support System for traP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GroupをJomonで保持せず、traQのAPIから取ってくるように修正

cskd8 opened this issue · comments

これって実装されたらグループの作成・削除API消えるのかな

最終的にこのinterfaceが消える、はず

Jomon/model/group.go

Lines 11 to 23 in 85fb937

type GroupRepository interface {
GetGroups(ctx context.Context) ([]*Group, error)
GetGroup(ctx context.Context, groupID uuid.UUID) (*Group, error)
CreateGroup(ctx context.Context, name string, description string, budget *int) (*Group, error)
UpdateGroup(ctx context.Context, groupID uuid.UUID, name string, description string, budget *int) (*Group, error)
DeleteGroup(ctx context.Context, groupID uuid.UUID) error
GetOwners(ctx context.Context, groupID uuid.UUID) ([]*Owner, error)
AddOwners(ctx context.Context, groupID uuid.UUID, ownerIDs []uuid.UUID) ([]*Owner, error)
DeleteOwners(ctx context.Context, groupID uuid.UUID, ownerIDs []uuid.UUID) error
GetMembers(ctx context.Context, groupID uuid.UUID) ([]*Member, error)
AddMembers(ctx context.Context, groupID uuid.UUID, userIDs []uuid.UUID) ([]*Member, error)
DeleteMembers(ctx context.Context, groupID uuid.UUID, userIDs []uuid.UUID) error
}

予算額の管理はJomon側でしたいので完全には消えなさそう

これ、groupの存在はtraQから持ってきて、それにJomon独自の情報を付け足すってイメージですか? @mehm8128

traQからgroupが消されるとまずくなりそう
過去の入出金を見返そうとした時など

合ってます

traQからgroupが消されるとまずくなりそう

確かにknoQとかtraPortfolioとかどうしてるんだろorどうするんだろ