memos/api/memo.go

47 lines
847 B
Go
Raw Normal View History

2021-12-08 18:43:14 +03:00
package api
2022-02-03 10:32:03 +03:00
type Memo struct {
2022-05-03 06:49:10 +03:00
ID int `json:"id"`
// Standard fields
CreatedTs int64 `json:"createdTs"`
UpdatedTs int64 `json:"updatedTs"`
RowStatus string `json:"rowStatus"`
2022-02-03 10:32:03 +03:00
2022-05-03 06:49:10 +03:00
// Domain specific fields
Content string `json:"content"`
2022-05-02 21:05:43 +03:00
CreatorID int `json:"creatorId"`
2021-12-08 18:43:14 +03:00
}
2022-02-03 10:32:03 +03:00
type MemoCreate struct {
2022-05-03 06:49:10 +03:00
// Standard fields
2022-05-02 21:05:43 +03:00
CreatorID int
2022-05-17 16:21:13 +03:00
// Used to import memos with a clearly created ts.
2022-05-15 17:21:13 +03:00
CreatedTs *int64 `json:"createdTs"`
2022-02-18 17:21:10 +03:00
2022-05-03 06:49:10 +03:00
// Domain specific fields
2022-02-18 17:21:10 +03:00
Content string `json:"content"`
2021-12-08 18:43:14 +03:00
}
2022-02-03 10:32:03 +03:00
type MemoPatch struct {
2022-05-02 21:05:43 +03:00
ID int
2021-12-08 18:43:14 +03:00
2022-05-03 06:49:10 +03:00
// Standard fields
RowStatus *string `json:"rowStatus"`
// Domain specific fields
Content *string `json:"content"`
2021-12-09 17:02:57 +03:00
}
2022-02-03 10:32:03 +03:00
type MemoFind struct {
2022-05-03 06:49:10 +03:00
ID *int `json:"id"`
// Standard fields
2022-05-02 21:05:43 +03:00
CreatorID *int `json:"creatorId"`
2022-02-05 06:43:25 +03:00
RowStatus *string `json:"rowStatus"`
2021-12-08 18:43:14 +03:00
}
2022-02-03 10:32:03 +03:00
type MemoDelete struct {
2022-05-17 16:21:13 +03:00
ID int `json:"id"`
2022-02-03 10:32:03 +03:00
}