新增测点配置
This commit is contained in:
@@ -7,11 +7,11 @@ import (
|
||||
)
|
||||
|
||||
type PeakValleyQuarter struct {
|
||||
Id uint `gorm:"column:id;primaryKey" json:"id"`
|
||||
Id int `gorm:"column:id;primaryKey" json:"id"`
|
||||
QuarterName string `gorm:"column:quarter_name;comment:季度名称" json:"quarter_name"`
|
||||
StartTime time.Time `gorm:"column:start_time;type:date;comment:开始时间" json:"start_time"`
|
||||
EndTime time.Time `gorm:"column:end_time;type:date;comment:结束时间" json:"end_time"`
|
||||
Rid uint `gorm:"column:rid;comment:季度使用规则" json:"rid"`
|
||||
Rid int `gorm:"column:rid;comment:季度使用规则" json:"rid"`
|
||||
Created time.Time `gorm:"column:created;autoCreateTime;comment:创建时间" json:"created"`
|
||||
Updated time.Time `gorm:"column:updated;autoUpdateTime;comment:修改时间" json:"updated"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index;comment:删除时间" json:"-"`
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
//(将时间段 转化为十分钟区块 查找到对应十分钟区块 创建该规则的电价)
|
||||
|
||||
type PeakValleyRule struct {
|
||||
RuleId uint `gorm:"column:rule_id;primaryKey" json:"rule_id"`
|
||||
RuleId int `gorm:"column:rule_id;primaryKey" json:"rule_id"`
|
||||
RuleName string `gorm:"column:rule_name;comment:规则名称" json:"rule_name"`
|
||||
Description string `gorm:"column:description;comment:描述" json:"description"`
|
||||
Created time.Time `gorm:"column:created;autoCreateTime;comment:创建时间" json:"created"`
|
||||
|
||||
@@ -11,7 +11,7 @@ const MinutesInADay = 24 * 60
|
||||
|
||||
// PeakValleyTimeBlock 峰谷时间区块
|
||||
type PeakValleyTimeBlock struct {
|
||||
BlockIndex uint `gorm:"column:block_index;primaryKey;comment:区块编号" json:"block_index"`
|
||||
BlockIndex int `gorm:"column:block_index;primaryKey;comment:区块编号" json:"block_index"`
|
||||
StartTime uint `gorm:"column:start_time;comment:开始时间" json:"start_time"`
|
||||
EndTime uint `gorm:"column:end_time;comment:结束时间" json:"end_time"`
|
||||
Created time.Time `gorm:"column:created;autoCreateTime;comment:创建时间" json:"created"`
|
||||
|
||||
@@ -35,12 +35,12 @@ type PeakValleyType struct {
|
||||
|
||||
// PeakValleyTimeBlockPrice 峰谷时间区块价格
|
||||
type PeakValleyTimeBlockPrice struct {
|
||||
Id uint `gorm:"column:id;primaryKey" json:"id"`
|
||||
BlockId uint `gorm:"column:block_id;comment:时间区块编号" json:"block_id"`
|
||||
Id int `gorm:"column:id;primaryKey" json:"id"`
|
||||
BlockId int `gorm:"column:block_id;comment:时间区块编号" json:"block_id"`
|
||||
Price int `gorm:"column:price;comment:价格" json:"price"`
|
||||
CustomName string `gorm:"column:custom_name;comment:自定义名称" json:"custom_name"`
|
||||
PeakValleyRuleId uint `gorm:"column:peak_valley_rule_id;comment:峰谷规则" json:"peak_valley_rule_id"`
|
||||
PeakValleyType uint `gorm:"column:peak_valley_type;default:1;size:10;comment:峰谷类型[1:尖,2:峰,3:平,4:谷,5:深谷]" json:"peak_valley_type"` // 峰谷类型
|
||||
PeakValleyRuleId int `gorm:"column:peak_valley_rule_id;comment:峰谷规则" json:"peak_valley_rule_id"`
|
||||
PeakValleyType int `gorm:"column:peak_valley_type;default:1;size:10;comment:峰谷类型[1:尖,2:峰,3:平,4:谷,5:深谷]" json:"peak_valley_type"` // 峰谷类型
|
||||
Created time.Time `gorm:"column:created;autoCreateTime;comment:创建时间" json:"created"`
|
||||
Updated time.Time `gorm:"column:updated;autoUpdateTime;comment:修改时间" json:"updated"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index;comment:删除时间" json:"-"`
|
||||
|
||||
Reference in New Issue
Block a user