Taobin-Recipe-Manager/server/contracts/recipe.go
2024-02-12 09:34:56 +07:00

93 lines
2.7 KiB
Go

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"`
OtherDescription string `json:"otherDescription"`
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 {
StringParam string `json:"StringParam"`
IsUse bool `json:"isUse"`
MaterialID uint64 `json:"materialID"`
Name string `json:"name"`
MixOrder int `json:"MixOrder"`
FeedParameter int `json:"feedParameter"`
FeedPattern int `json:"feedPattern"`
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"`
}
type GetAllRecipeRequest struct {
Filename string `json:"filename"`
Country string `json:"country"`
}
type GetAllRecipeResponse struct {
Result []RecipeOverview `json:"result"`
}