feat: add public id field to resource (#1451)

* feat: add public id field to resource

* feat: support reset resource link
This commit is contained in:
boojack
2023-04-03 13:41:27 +08:00
committed by GitHub
parent c9a5df81ce
commit 1cab30f32f
15 changed files with 179 additions and 190 deletions

View File

@ -15,6 +15,7 @@ type Resource struct {
ExternalLink string `json:"externalLink"`
Type string `json:"type"`
Size int64 `json:"size"`
PublicID string `json:"publicId"`
// Related fields
LinkedMemoAmount int `json:"linkedMemoAmount"`
@ -31,6 +32,7 @@ type ResourceCreate struct {
ExternalLink string `json:"externalLink"`
Type string `json:"type"`
Size int64 `json:"-"`
PublicID string `json:"publicId"`
}
type ResourceFind struct {
@ -42,6 +44,7 @@ type ResourceFind struct {
// Domain specific fields
Filename *string `json:"filename"`
MemoID *int
PublicID *string `json:"publicId"`
GetBlob bool
// Pagination
@ -56,7 +59,9 @@ type ResourcePatch struct {
UpdatedTs *int64
// Domain specific fields
Filename *string `json:"filename"`
Filename *string `json:"filename"`
ResetPublicID *bool `json:"resetPublicId"`
PublicID *string `json:"-"`
}
type ResourceDelete struct {