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
|
2022-02-04 11:51:48 +03:00
|
|
|
Filename string `json:"filename"`
|
2022-08-07 02:07:04 +03:00
|
|
|
Blob []byte `json:"-"`
|
2022-02-04 11:51:48 +03:00
|
|
|
Type string `json:"type"`
|
|
|
|
Size int64 `json:"size"`
|
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
|
|
|
|
CreatorID int
|
|
|
|
|
|
|
|
// Domain specific fields
|
2022-02-04 11:51:48 +03:00
|
|
|
Filename string `json:"filename"`
|
|
|
|
Blob []byte `json:"blob"`
|
|
|
|
Type string `json:"type"`
|
|
|
|
Size int64 `json:"size"`
|
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
|
|
|
|
Filename *string `json:"filename"`
|
2021-12-14 15:08:12 +03:00
|
|
|
}
|
|
|
|
|
2022-02-03 10:32:03 +03:00
|
|
|
type ResourceDelete struct {
|
2022-05-02 21:05:43 +03:00
|
|
|
ID int
|
2022-08-06 20:30:48 +03:00
|
|
|
|
|
|
|
// Standard fields
|
|
|
|
CreatorID int
|
2021-12-14 15:08:12 +03:00
|
|
|
}
|