chore: revert "feat: add visibility field to resource (#743)" (#751)

Revert "feat: add `visibility` field to resource (#743)"

This reverts commit b68cc08592.
This commit is contained in:
boojack
2022-12-16 22:20:17 +08:00
committed by GitHub
parent b68cc08592
commit 575a0610a3
4 changed files with 24 additions and 44 deletions

View File

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