Files
energy-management-system/form/peak_valley_rule.go
2024-09-03 15:52:38 +08:00

56 lines
1.6 KiB
Go

package form
type PeakValleyQuarterListReq struct {
Page `json:"page"`
}
type PeakValleyQuarterEditDetailReq struct {
Id int `form:"id" json:"id"`
}
type CreatePeakValleyQuarterReq struct {
QuarterName string `json:"quarter_name"`
StartTime string `json:"start_time"`
EndTime string `json:"end_time"`
RuleId int `json:"rule_id"`
}
type UpdatePeakValleyQuarterReq struct {
Id int `json:"id" binding:"required"`
QuarterName string `json:"quarter_name"`
StartTime string `json:"start_time"`
EndTime string `json:"end_time"`
RuleId int `json:"rule_id"`
}
type PeakValleyRuleListReq struct {
Page `json:"page"`
}
type PeakValleyRuleDetailReq struct {
RuleId int `form:"rule_id" json:"rule_id"`
}
type PeakValleyRuleEditDetailReq struct {
RuleId int `form:"rule_id" json:"rule_id"`
}
type CreatePeakValleyRuleReq struct {
RuleName string `json:"rule_name" binding:"required"`
Description string `json:"description" binding:"required"`
RuleItem []TimeBlockPriceReq `json:"rule_item"`
}
type UpdatePeakValleyRuleReq struct {
RuleId int `json:"rule_id" binding:"required"`
RuleName string `json:"rule_name" binding:"required"`
Description string `json:"description" binding:"required"`
RuleItem []TimeBlockPriceReq `json:"rule_item"`
}
type TimeBlockPriceReq struct {
CustomName string `json:"custom_name"`
PeakValleyType int `json:"peak_valley_type"`
StartTime string `json:"start_time"`
EndTime string `json:"end_time"`
Price int `json:"price"`
}