You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
memos/api/memo.go

43 lines
798 B
Go

3 years ago
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"`
3 years ago
}
type MemoCreate struct {
Content string `json:"content"`
CreatorId int
3 years ago
}
type MemoPatch struct {
Id int
3 years ago
Content *string
RowStatus *string
}
type MemoFind struct {
Id *int
CreatorId *int
3 years ago
RowStatus *string
3 years ago
}
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
3 years ago
}