Files
energy-management-system/form/peak_valley_rule.go
2024-08-26 17:20:13 +08:00

43 lines
1.2 KiB
Go

package form
// 一天的完整谷峰规则
// 发电 (光伏)
// 用电 (电机、生产)
//新建规则
//
//选择时间段 设置电价
//(将时间段 转化为十分钟区块 查找到对应十分钟区块 创建该规则的电价)
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 uint `json:"peak_valley_type"`
StartTime string `json:"start_time"`
EndTime string `json:"end_time"`
Price int `json:"price"`
}