update recipe detail and recipe detail list
This commit is contained in:
parent
8b45ed53ee
commit
d52cad09fd
16 changed files with 947 additions and 458 deletions
82
server/contracts/recipe.go
Normal file
82
server/contracts/recipe.go
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
package contracts
|
||||
|
||||
// ================================== Recipes Dashboard and Overview ==================================
|
||||
|
||||
type RecipeOverview struct {
|
||||
ID int `json:"id"`
|
||||
ProductCode string `json:"productCode"`
|
||||
Name string `json:"name"`
|
||||
OtherName string `json:"otherName"`
|
||||
Description string `json:"description"`
|
||||
LastUpdated string `json:"lastUpdated"`
|
||||
}
|
||||
|
||||
type RecipeDashboardRequest struct {
|
||||
Country string `json:"country"`
|
||||
Filename string `json:"filename"`
|
||||
}
|
||||
|
||||
type RecipeDashboardResponse struct {
|
||||
ConfigNumber int `json:"configNumber"`
|
||||
LastUpdated string `json:"lastUpdated"`
|
||||
Filename string `json:"filename"`
|
||||
}
|
||||
|
||||
type RecipeOverviewRequest struct {
|
||||
Take int `json:"take"`
|
||||
Skip int `json:"skip"`
|
||||
Search string `json:"search"`
|
||||
Country string `json:"country"`
|
||||
Filename string `json:"filename"`
|
||||
MatIds []int `json:"matIds"`
|
||||
}
|
||||
|
||||
type RecipeOverviewResponse struct {
|
||||
Result []RecipeOverview `json:"result"`
|
||||
HasMore bool `json:"hasMore"`
|
||||
TotalCount int `json:"totalCount"`
|
||||
}
|
||||
|
||||
// ================================== Recipe Detail ==================================
|
||||
|
||||
type RecipeDetailRequest struct {
|
||||
Filename string `json:"filename"`
|
||||
Country string `json:"country"`
|
||||
ProductCode string `json:"productCode"`
|
||||
}
|
||||
|
||||
type RecipeDetailResponse struct {
|
||||
Name string `json:"name"`
|
||||
OtherName string `json:"otherName"`
|
||||
Description string `json:"description"`
|
||||
OtherDescription string `json:"otherDescription"`
|
||||
LastUpdated string `json:"lastUpdated"`
|
||||
Picture string `json:"picture"`
|
||||
}
|
||||
|
||||
type RecipeDetailMat struct {
|
||||
MaterialID uint64 `json:"materialID"`
|
||||
Name string `json:"name"`
|
||||
MixOrder int `json:"mixOrder"`
|
||||
FeedParameter int `json:"feedParameter"`
|
||||
FeedPattern int `json:"feedPattern"`
|
||||
IsUse bool `json:"isUse"`
|
||||
MaterialPathId int `json:"materialPathId"`
|
||||
PowderGram int `json:"powderGram"`
|
||||
PowderTime int `json:"powderTime"`
|
||||
StirTime int `json:"stirTime"`
|
||||
SyrupGram int `json:"syrupGram"`
|
||||
SyrupTime int `json:"syrupTime"`
|
||||
WaterCold int `json:"waterCold"`
|
||||
WaterYield int `json:"waterYield"`
|
||||
}
|
||||
|
||||
type RecipeDetailMatListRequest struct {
|
||||
Filename string `json:"filename"`
|
||||
Country string `json:"country"`
|
||||
ProductCode string `json:"productCode"`
|
||||
}
|
||||
|
||||
type RecipeDetailMatListResponse struct {
|
||||
Result []RecipeDetailMat `json:"result"`
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue