feat: implement memo relation server (#1618)

This commit is contained in:
boojack
2023-05-01 16:09:41 +08:00
committed by GitHub
parent 6e6aae6649
commit b6564bcd77
9 changed files with 276 additions and 8 deletions

View File

@ -42,8 +42,9 @@ type Memo struct {
Pinned bool `json:"pinned"`
// Related fields
CreatorName string `json:"creatorName"`
ResourceList []*Resource `json:"resourceList"`
CreatorName string `json:"creatorName"`
ResourceList []*Resource `json:"resourceList"`
RelationList []*MemoRelation `json:"relationList"`
}
type MemoCreate struct {
@ -56,7 +57,8 @@ type MemoCreate struct {
Content string `json:"content"`
// Related fields
ResourceIDList []int `json:"resourceIdList"`
ResourceIDList []int `json:"resourceIdList"`
MemoRelationList []*MemoRelationUpsert `json:"memoRelationList"`
}
type MemoPatch struct {
@ -72,7 +74,8 @@ type MemoPatch struct {
Visibility *Visibility `json:"visibility"`
// Related fields
ResourceIDList []int `json:"resourceIdList"`
ResourceIDList []int `json:"resourceIdList"`
MemoRelationList []*MemoRelationUpsert `json:"memoRelationList"`
}
type MemoFind struct {