mirror of
https://github.com/usememos/memos.git
synced 2024-11-13 18:31:28 +08:00
55 lines
1,010 B
Go
55 lines
1,010 B
Go
package api
|
|
|
|
type Memo struct {
|
|
ID int `json:"id"`
|
|
|
|
// Standard fields
|
|
RowStatus RowStatus `json:"rowStatus"`
|
|
CreatorID int `json:"creatorId"`
|
|
CreatedTs int64 `json:"createdTs"`
|
|
UpdatedTs int64 `json:"updatedTs"`
|
|
|
|
// Domain specific fields
|
|
Content string `json:"content"`
|
|
Pinned bool `json:"pinned"`
|
|
}
|
|
|
|
type MemoCreate struct {
|
|
// Standard fields
|
|
CreatorID int
|
|
// Used to import memos with a clearly created ts.
|
|
CreatedTs *int64 `json:"createdTs"`
|
|
|
|
// Domain specific fields
|
|
Content string `json:"content"`
|
|
}
|
|
|
|
type MemoPatch struct {
|
|
ID int
|
|
|
|
// Standard fields
|
|
RowStatus *RowStatus `json:"rowStatus"`
|
|
|
|
// Domain specific fields
|
|
Content *string `json:"content"`
|
|
}
|
|
|
|
type MemoFind struct {
|
|
ID *int `json:"id"`
|
|
|
|
// Standard fields
|
|
RowStatus *RowStatus `json:"rowStatus"`
|
|
CreatorID *int `json:"creatorId"`
|
|
|
|
// Domain specific fields
|
|
Pinned *bool
|
|
ContentSearch *string
|
|
|
|
// Pagination
|
|
Limit int
|
|
Offset int
|
|
}
|
|
|
|
type MemoDelete struct {
|
|
ID int `json:"id"`
|
|
}
|