init
This commit is contained in:
42
form/peak_valley_rule.go
Normal file
42
form/peak_valley_rule.go
Normal file
@@ -0,0 +1,42 @@
|
||||
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"`
|
||||
}
|
||||
Reference in New Issue
Block a user