2021-12-14 15:08:12 +03:00
|
|
|
package api
|
|
|
|
|
2022-02-03 10:32:03 +03:00
|
|
|
type Resource struct {
|
2022-05-03 06:49:10 +03:00
|
|
|
ID int `json:"id"`
|
|
|
|
|
|
|
|
// Standard fields
|
|
|
|
CreatorID int `json:"creatorId"`
|
2022-02-04 11:51:48 +03:00
|
|
|
CreatedTs int64 `json:"createdTs"`
|
|
|
|
UpdatedTs int64 `json:"updatedTs"`
|
2021-12-14 15:08:12 +03:00
|
|
|
|
2022-05-03 06:49:10 +03:00
|
|
|
// Domain specific fields
|
2023-02-27 16:26:50 +03:00
|
|
|
Filename string `json:"filename"`
|
|
|
|
Blob []byte `json:"-"`
|
2023-03-19 14:37:57 +03:00
|
|
|
InternalPath string `json:"internalPath"`
|
2023-02-27 16:26:50 +03:00
|
|
|
ExternalLink string `json:"externalLink"`
|
|
|
|
Type string `json:"type"`
|
|
|
|
Size int64 `json:"size"`
|
|
|
|
Visibility Visibility `json:"visibility"`
|
2022-10-03 04:39:49 +03:00
|
|
|
|
|
|
|
// Related fields
|
|
|
|
LinkedMemoAmount int `json:"linkedMemoAmount"`
|
2021-12-14 15:08:12 +03:00
|
|
|
}
|
|
|
|
|
2022-02-03 10:32:03 +03:00
|
|
|
type ResourceCreate struct {
|
2022-05-03 06:49:10 +03:00
|
|
|
// Standard fields
|
2022-12-28 15:22:52 +03:00
|
|
|
CreatorID int `json:"-"`
|
2022-05-03 06:49:10 +03:00
|
|
|
|
|
|
|
// Domain specific fields
|
2023-02-27 16:26:50 +03:00
|
|
|
Filename string `json:"filename"`
|
|
|
|
Blob []byte `json:"-"`
|
2023-03-19 14:37:57 +03:00
|
|
|
InternalPath string `json:"internalPath"`
|
2023-02-27 16:26:50 +03:00
|
|
|
ExternalLink string `json:"externalLink"`
|
|
|
|
Type string `json:"type"`
|
|
|
|
Size int64 `json:"-"`
|
|
|
|
Visibility Visibility `json:"visibility"`
|
2021-12-14 15:08:12 +03:00
|
|
|
}
|
|
|
|
|
2022-02-03 10:32:03 +03:00
|
|
|
type ResourceFind struct {
|
2022-05-03 06:49:10 +03:00
|
|
|
ID *int `json:"id"`
|
|
|
|
|
|
|
|
// Standard fields
|
|
|
|
CreatorID *int `json:"creatorId"`
|
|
|
|
|
|
|
|
// Domain specific fields
|
2022-12-16 17:20:17 +03:00
|
|
|
Filename *string `json:"filename"`
|
|
|
|
MemoID *int
|
2023-01-25 11:11:02 +03:00
|
|
|
GetBlob bool
|
2021-12-14 15:08:12 +03:00
|
|
|
}
|
|
|
|
|
2022-10-29 10:40:09 +03:00
|
|
|
type ResourcePatch struct {
|
2022-12-23 13:38:24 +03:00
|
|
|
ID int `json:"-"`
|
2022-10-29 10:40:09 +03:00
|
|
|
|
|
|
|
// Standard fields
|
|
|
|
UpdatedTs *int64
|
|
|
|
|
2022-11-06 07:21:58 +03:00
|
|
|
// Domain specific fields
|
2023-02-27 16:26:50 +03:00
|
|
|
Filename *string `json:"filename"`
|
|
|
|
Visibility *Visibility `json:"visibility"`
|
2022-10-29 10:40:09 +03:00
|
|
|
}
|
2022-11-06 07:21:58 +03:00
|
|
|
|
|
|
|
type ResourceDelete struct {
|
|
|
|
ID int
|
|
|
|
}
|