update recipe model

This commit is contained in:
Kenta420-Poom 2023-09-21 17:28:37 +07:00
parent 8228a4f46c
commit b681a5a9af
7 changed files with 301 additions and 114 deletions

View file

@ -1,7 +1,7 @@
package models
type Recipe struct {
Timestamps string `json:"timestamps"`
Timestamp string `json:"Timestamp"`
MachineSetting MatchineSetting `json:"MachineSetting"`
Recipe01 []Recipe01 `json:"Recipe01"`
Topping Topping `json:"Topping"`
@ -23,46 +23,121 @@ type MaterailCode struct {
MaterialCode string `json:"materialCode"`
}
// export interface MaterialSetting {
// AlarmIDWhenOffline: number;
// BeanChannel: boolean;
// CanisterType?: string;
// DrainTimer: number;
// IsEquipment: boolean;
// LeavesChannel: boolean;
// LowToOffline: number;
// MaterialDescrption?: string;
// MaterialStatus: number;
// PowderChannel: boolean;
// RefillUnitGram: boolean;
// RefillUnitMilliliters: boolean;
// RefillUnitPCS: boolean;
// ScheduleDrainType: number;
// SodaChannel: boolean;
// StockAdjust: number;
// StrTextShowError: string[];
// SyrupChannel: boolean;
// id: number;
// idAlternate: number;
// isUse: boolean;
// materialOtherName: string;
// materialName: string;
// pathOtherName?: string;
// pay_rettry_max_count: number;
// RawMaterialUnit?: string;
// RawMaterialData?: RawMaterialDatum[];
// MaterialComment?: string;
// MaterialStatusLastUpdate?: string;
// feed_mode?: string;
// MaterialParameter?: string;
// }
type MaterialSetting struct {
AlarmIDWhenOffline int `json:"AlarmIDWhenOffline"`
BeanChannel bool `json:"BeanChannel"`
CanisterType string `json:"CanisterType"`
DrainTimer int `json:"DrainTimer"`
AlarmIDWhenOffline int `json:"AlarmIDWhenOffline"`
BeanChannel bool `json:"BeanChannel"`
CanisterType string `json:"CanisterType"`
DrainTimer int `json:"DrainTimer"`
IsEquipment bool `json:"IsEquipment"`
LeavesChannel bool `json:"LeavesChannel"`
LowToOffline int `json:"LowToOffline"`
MaterialStatus int `json:"MaterialStatus"`
PowderChannel bool `json:"PowderChannel"`
RefillUnitGram bool `json:"RefillUnitGram"`
RefillUnitMilliliters bool `json:"RefillUnitMilliliters"`
RefillUnitPCS bool `json:"RefillUnitPCS"`
ScheduleDrainType int `json:"ScheduleDrainType"`
SodaChannel bool `json:"SodaChannel"`
StockAdjust int `json:"StockAdjust"`
SyrupChannel bool `json:"SyrupChannel"`
ID int `json:"id"`
IDAlternate int `json:"idAlternate"`
IsUse bool `json:"isUse"`
PayRettryMaxCount int `json:"pay_rettry_max_count"`
FeedMode string `json:"feed_mode"`
MaterialParameter string `json:"MaterialParameter"`
}
type Recipe01 struct{}
type Topping struct{}
type Recipe01 struct {
Description string `json:"Description"`
ExtendID int `json:"ExtendID"`
OnTOP bool `json:"OnTOP"`
LastChange string `json:"LastChange"`
MenuStatus int `json:"MenuStatus"`
RemainingCups string `json:"RemainingCups"`
StringParam string `json:"StringParam"`
TextForWarningBeforePay []string `json:"TextForWarningBeforePay"`
CashPrice int `json:"cashPrice"`
Changerecipe string `json:"changerecipe"`
Disable bool `json:"disable"`
Disable_by_cup bool `json:"disable_by_cup"`
Disable_by_ice bool `json:"disable_by_ice"`
EncoderCount int `json:"EncoderCount"`
ID int `json:"id"`
IsUse bool `json:"isUse"`
IsShow bool `json:"isShow"`
Name string `json:"name"`
NonCashPrice int `json:"nonCashPrice"`
OtherDescription string `json:"otherDescription"`
OtherName string `json:"otherName"`
ProductCode string `json:"productCode"`
Recipes []MatRecipe `json:"recipes"`
SubMenu []Recipe01 `json:"SubMenu"`
ToppingSet []ToppingSet `json:"ToppingSet"`
Total_time int `json:"total_time"`
Total_weight int `json:"total_weight"`
UriData string `json:"uriData"`
UseGram bool `json:"useGram"`
Weight_float int `json:"weight_float"`
}
type MatRecipe struct {
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 ToppingSet struct {
ListGroupID []int `json:"ListGroupID"`
DefaultIDSelect int `json:"defaultIDSelect"`
GroupID string `json:"groupID"`
IsUse bool `json:"isUse"`
}
type Topping struct {
ToppingGroup []ToppingGroup `json:"ToppingGroup"`
ToppingList []ToppingList `json:"ToppingList"`
}
type ToppingGroup struct {
Desc string `json:"Desc"`
GroupID int `json:"groupID"`
IDDefault int `json:"idDefault"`
IDInGroup string `json:"idInGroup"`
InUse bool `json:"inUse"`
Name string `json:"name"`
OtherName string `json:"otherName"`
}
type ToppingList struct {
ExtendID int `json:"ExtendID"`
OnTOP bool `json:"OnTOP"`
MenuStatus int `json:"MenuStatus"`
CashPrice int `json:"cashPrice"`
Disable bool `json:"disable"`
Disable_by_cup bool `json:"disable_by_cup"`
Disable_by_ice bool `json:"disable_by_ice"`
EncoderCount int `json:"EncoderCount"`
ID int `json:"id"`
IsUse bool `json:"isUse"`
IsShow bool `json:"isShow"`
StringParam string `json:"stringParam"`
Name string `json:"name"`
NonCashPrice int `json:"nonCashPrice"`
OtherName string `json:"otherName"`
ProductCode string `json:"productCode"`
Recipes []MatRecipe `json:"recipes"`
Total_time int `json:"total_time"`
Total_weight int `json:"total_weight"`
UseGram bool `json:"useGram"`
Weight_float int `json:"weight_float"`
}