mirror of
https://github.com/usememos/memos.git
synced 2024-12-21 10:11:42 +03:00
43 lines
890 B
Go
43 lines
890 B
Go
package api
|
|
|
|
type Memo struct {
|
|
Id int `json:"id"`
|
|
CreatedTs int64 `json:"createdTs"`
|
|
UpdatedTs int64 `json:"updatedTs"`
|
|
RowStatus string `json:"rowStatus"`
|
|
|
|
Content string `json:"content"`
|
|
CreatorId int `json:"creatorId"`
|
|
}
|
|
|
|
type MemoCreate struct {
|
|
Content string `json:"content"`
|
|
CreatorId int
|
|
}
|
|
|
|
type MemoPatch struct {
|
|
Id int
|
|
|
|
Content *string `json:"content"`
|
|
RowStatus *string `json:"rowStatus"`
|
|
}
|
|
|
|
type MemoFind struct {
|
|
Id *int `json:"id"`
|
|
CreatorId *int `json:"creatorId"`
|
|
RowStatus *string `json:"rowStatus"`
|
|
}
|
|
|
|
type MemoDelete struct {
|
|
Id *int `json:"id"`
|
|
CreatorId *int
|
|
}
|
|
|
|
type MemoService interface {
|
|
CreateMemo(create *MemoCreate) (*Memo, error)
|
|
PatchMemo(patch *MemoPatch) (*Memo, error)
|
|
FindMemoList(find *MemoFind) ([]*Memo, error)
|
|
FindMemo(find *MemoFind) (*Memo, error)
|
|
DeleteMemo(delete *MemoDelete) error
|
|
}
|