electricity_bill_calc_service/model/report.go

30 lines
1.3 KiB
Go

package model
import "time"
type Report struct {
CreatedAndModified `xorm:"extends"`
Id string `xorm:"varchar(120) pk not null" json:"id"`
ParkId string `xorm:"varchar(120) not null" json:"parkId"`
Period time.Time `xorm:"date not null" json:"period" time_format:"simple_date" time_location:"shanghai"`
StepState Steps `xorm:"text not null json" json:"stepState"`
Published bool `xorm:"bool not null default false" json:"published"`
PublishedAt *time.Time `xorm:"timestampz" json:"publishedAt" time_format:"simple_datetime" time_location:"shanghai"`
Withdraw int8 `xorm:"smallint not null default 0" json:"withdraw"`
LastWithdrawAppliedAt *time.Time `xorm:"timestampz" json:"lastWithdrawAppliedAt" time_format:"simple_datetime" time_location:"shanghai"`
LastWithdrawAuditAt *time.Time `xorm:"timestampz" json:"lastWithdrawAuditAt" time_format:"simple_datetime" time_location:"shanghai"`
}
type Steps struct {
Summary bool `json:"summary"`
WillDiluted bool `json:"willDiluted"`
Submeter bool `json:"submeter"`
Calculate bool `json:"calculate"`
Preview bool `json:"preview"`
Publish bool `json:"publish"`
}
func (Report) TableName() string {
return "report"
}