feat: add visibility field to resource (#743)

This commit is contained in:
boojack
2022-12-15 21:15:16 +08:00
committed by GitHub
parent d51af7e98a
commit b68cc08592
4 changed files with 44 additions and 24 deletions

View File

@ -9,10 +9,11 @@ type Resource struct {
UpdatedTs int64 `json:"updatedTs"`
// Domain specific fields
Filename string `json:"filename"`
Blob []byte `json:"-"`
Type string `json:"type"`
Size int64 `json:"size"`
Filename string `json:"filename"`
Blob []byte `json:"-"`
Type string `json:"type"`
Size int64 `json:"size"`
Visibility Visibility `json:"visibility"`
// Related fields
LinkedMemoAmount int `json:"linkedMemoAmount"`
@ -23,10 +24,11 @@ type ResourceCreate struct {
CreatorID int
// Domain specific fields
Filename string `json:"filename"`
Blob []byte `json:"blob"`
Type string `json:"type"`
Size int64 `json:"size"`
Filename string `json:"filename"`
Blob []byte `json:"blob"`
Type string `json:"type"`
Size int64 `json:"size"`
Visibility Visibility `json:"visibility"`
}
type ResourceFind struct {
@ -36,8 +38,9 @@ type ResourceFind struct {
CreatorID *int `json:"creatorId"`
// Domain specific fields
Filename *string `json:"filename"`
MemoID *int
Filename *string `json:"filename"`
MemoID *int
Visibility *Visibility `json:"visibility"`
}
type ResourcePatch struct {
@ -47,7 +50,8 @@ type ResourcePatch struct {
UpdatedTs *int64
// Domain specific fields
Filename *string `json:"filename"`
Filename *string `json:"filename"`
Visibility *Visibility `json:"visibility"`
}
type ResourceDelete struct {