memos/api/resource.go

45 lines
813 B
Go
Raw Normal View History

package api
2022-02-03 15:32:03 +08:00
type Resource struct {
2022-05-03 11:49:10 +08:00
ID int `json:"id"`
// Standard fields
CreatorID int `json:"creatorId"`
CreatedTs int64 `json:"createdTs"`
UpdatedTs int64 `json:"updatedTs"`
2022-05-03 11:49:10 +08:00
// Domain specific fields
Filename string `json:"filename"`
Blob []byte `json:"blob"`
Type string `json:"type"`
Size int64 `json:"size"`
}
2022-02-03 15:32:03 +08:00
type ResourceCreate struct {
2022-05-03 11:49:10 +08:00
// Standard fields
CreatorID int
// Domain specific fields
Filename string `json:"filename"`
Blob []byte `json:"blob"`
Type string `json:"type"`
Size int64 `json:"size"`
}
2022-02-03 15:32:03 +08:00
type ResourceFind struct {
2022-05-03 11:49:10 +08:00
ID *int `json:"id"`
// Standard fields
CreatorID *int `json:"creatorId"`
// Domain specific fields
Filename *string `json:"filename"`
}
2022-02-03 15:32:03 +08:00
type ResourceDelete struct {
2022-05-03 02:05:43 +08:00
ID int
2022-08-07 01:30:48 +08:00
// Standard fields
CreatorID int
}