2021-12-08 23:43:14 +08:00
|
|
|
package api
|
|
|
|
|
2022-02-03 15:32:03 +08:00
|
|
|
type Memo struct {
|
|
|
|
Id int `jsonapi:"primary,memo"`
|
|
|
|
CreatedTs int64 `jsonapi:"attr,createdTs"`
|
|
|
|
UpdatedTs int64 `jsonapi:"attr,updatedTs"`
|
|
|
|
RowStatus string `jsonapi:"attr,rowStatus"`
|
|
|
|
|
|
|
|
Content string `jsonapi:"attr,content"`
|
|
|
|
CreatorId int `jsonapi:"attr,creatorId"`
|
2021-12-08 23:43:14 +08:00
|
|
|
}
|
|
|
|
|
2022-02-03 15:32:03 +08:00
|
|
|
type MemoCreate struct {
|
|
|
|
Content string `jsonapi:"attr,content"`
|
|
|
|
CreatorId int
|
2021-12-08 23:43:14 +08:00
|
|
|
}
|
|
|
|
|
2022-02-03 15:32:03 +08:00
|
|
|
type MemoPatch struct {
|
|
|
|
Id int
|
2021-12-08 23:43:14 +08:00
|
|
|
|
2022-02-03 15:32:03 +08:00
|
|
|
Content *string
|
|
|
|
RowStatus *string
|
2021-12-09 22:02:57 +08:00
|
|
|
}
|
|
|
|
|
2022-02-03 15:32:03 +08:00
|
|
|
type MemoFind struct {
|
|
|
|
Id *int
|
|
|
|
CreatorId *int
|
2021-12-08 23:43:14 +08:00
|
|
|
}
|
|
|
|
|
2022-02-03 15:32:03 +08:00
|
|
|
type MemoDelete struct {
|
|
|
|
Id *int `jsonapi:"primary,memo"`
|
|
|
|
CreatorId *int
|
|
|
|
}
|
2021-12-10 13:41:17 +08:00
|
|
|
|
2022-02-03 15:32:03 +08:00
|
|
|
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
|
2021-12-08 23:43:14 +08:00
|
|
|
}
|