forked from free-lancers/electricity_bill_calc_service
		
	feat(model):基本完成数据库结构的定义。
This commit is contained in:
		
							
								
								
									
										41
									
								
								model/end_user_detail.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								model/end_user_detail.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,41 @@ | ||||
| package model | ||||
|  | ||||
| import "github.com/shopspring/decimal" | ||||
|  | ||||
| type EndUserDetail struct { | ||||
| 	CreatedAndModified       `xorm:"extends"` | ||||
| 	ReportId                 string              `xorm:"varchar(120) pk notnull" json:"-"` | ||||
| 	MeterId                  string              `xorm:"meter_04kv_id varchar(120) pk notnull" json:"meterId"` | ||||
| 	LastPeriodCritical       decimal.NullDecimal `xorm:"decimal(14,2)" json:"lastPeriodCritical"` | ||||
| 	LastPeriodPeek           decimal.NullDecimal `xorm:"decimal(14,2)" json:"lastPeriodPeek"` | ||||
| 	LastPeriodFlat           decimal.Decimal     `xorm:"decimal(14,2) notnull" json:"lastPeriodFlat"` | ||||
| 	LastPeriodValley         decimal.NullDecimal `xorm:"decimal(14,2)" json:"lastPeriodValley"` | ||||
| 	CurrentPeriodCritical    decimal.NullDecimal `xorm:"decimal(14,2)" json:"currentPeriodCritical"` | ||||
| 	CurrentPeriodPeek        decimal.NullDecimal `xorm:"decimal(14,2)" json:"currentPeriodPeek"` | ||||
| 	CurrentPeriodFlat        decimal.Decimal     `xorm:"decimal(14,2) notnull" json:"currentPeriodFlat"` | ||||
| 	CurrentPeriodValley      decimal.NullDecimal `xorm:"decimal(14,2)" json:"currentPeriodValley"` | ||||
| 	AdjustCritical           decimal.NullDecimal `xorm:"decimal(14,2)" json:"adjustCritical"` | ||||
| 	AdjustPeek               decimal.NullDecimal `xorm:"decimal(14,2)" json:"adjustPeek"` | ||||
| 	AdjustFlat               decimal.Decimal     `xorm:"decimal(14,2) notnull" json:"adjustFlat"` | ||||
| 	AdjustValley             decimal.NullDecimal `xorm:"decimal(14,2)" json:"adjustValley"` | ||||
| 	Critical                 decimal.NullDecimal `xorm:"decimal(14,2)" json:"critical"` | ||||
| 	CriticalFee              decimal.NullDecimal `xorm:"decimal(18,8)" json:"criticalFee"` | ||||
| 	Peek                     decimal.NullDecimal `xorm:"decimal(14,2)" json:"peek"` | ||||
| 	PeekFee                  decimal.NullDecimal `xorm:"decimal(18,8)" json:"peekFee"` | ||||
| 	Flat                     decimal.Decimal     `xorm:"decimal(14,2) notnull" json:"flat"` | ||||
| 	FlatFee                  decimal.Decimal     `xorm:"decimal(18,8) notnull" json:"flatFee"` | ||||
| 	Valley                   decimal.NullDecimal `xorm:"decimal(14,2)" json:"valley"` | ||||
| 	ValleyFee                decimal.NullDecimal `xorm:"decimal(18,8)" json:"valleyFee"` | ||||
| 	BasicFeeDiluted          decimal.NullDecimal `xorm:"decimal(18,8)" json:"basicFeeDiluted"` | ||||
| 	AdjustFeeDiluted         decimal.NullDecimal `xorm:"decimal(18,8)" json:"adjustFeeDiluted"` | ||||
| 	LossDiluted              decimal.NullDecimal `xorm:"decimal(18,8)" json:"lossDiluted"` | ||||
| 	LossFeeDiluted           decimal.NullDecimal `xorm:"decimal(18,8)" json:"lossFeeDiluted"` | ||||
| 	MaintenanceFeeDiluted    decimal.NullDecimal `xorm:"decimal(18,8)" json:"maintenanceFeeDiluted"` | ||||
| 	PublicConsumptionDiluted decimal.NullDecimal `xorm:"decimal(18,8)" json:"publicConsumptionDiluted"` | ||||
| 	ServiceFeeDiluted        decimal.NullDecimal `xorm:"decimal(18,8)" json:"serviceFeeDiluted"` | ||||
| 	FinalCharge              decimal.NullDecimal `xorm:"decimal(14,2)" json:"finalCharge"` | ||||
| } | ||||
|  | ||||
| func (EndUserDetail) TableName() string { | ||||
| 	return "end_user_detail" | ||||
| } | ||||
| @@ -3,7 +3,7 @@ package model | ||||
| import "github.com/shopspring/decimal" | ||||
|  | ||||
| type ReportSummary struct { | ||||
| 	ReportId                      string              `xorm:"varchar(120) pk notnull" json:"reportId"` | ||||
| 	ReportId                      string              `xorm:"varchar(120) pk notnull" json:"-"` | ||||
| 	Overall                       decimal.Decimal     `xorm:"decimal(14,2) notnull" json:"overall"` | ||||
| 	OverallFee                    decimal.Decimal     `xorm:"decimal(14,2) notnull" json:"overallFee"` | ||||
| 	OverallPrice                  decimal.Decimal     `xorm:"decimal(16,8)" json:"overallPrice"` | ||||
|   | ||||
		Reference in New Issue
	
	Block a user