65 lines
2.1 KiB
Go
65 lines
2.1 KiB
Go
package vo
|
|
|
|
import (
|
|
"electricity_bill_calc/types"
|
|
|
|
"github.com/shopspring/decimal"
|
|
)
|
|
|
|
type MeterCreationForm struct {
|
|
Code string `json:"code"`
|
|
Address *string `json:"address"`
|
|
Ratio decimal.Decimal `json:"ratio"`
|
|
Seq int64 `json:"seq"`
|
|
MeterType int16 `json:"meterType"`
|
|
Building *string `json:"building"`
|
|
OnFloor *string `json:"onFloor"`
|
|
Area decimal.NullDecimal `json:"area"`
|
|
Enabled bool `json:"enabled"`
|
|
MeterReadingForm `json:"-"`
|
|
}
|
|
|
|
type MeterModificationForm struct {
|
|
Address *string `json:"address"`
|
|
Seq int64 `json:"seq"`
|
|
Ratio decimal.Decimal `json:"ratio"`
|
|
Enabled bool `json:"enabled"`
|
|
MeterType int16 `json:"meterType"`
|
|
Building *string `json:"building"`
|
|
OnFloor *string `json:"onFloor"`
|
|
Area decimal.NullDecimal `json:"area"`
|
|
}
|
|
|
|
type NewMeterForReplacingForm struct {
|
|
Code string `json:"code"`
|
|
Ratio decimal.Decimal `json:"ratio"`
|
|
Reading MeterReadingForm `json:"reading"`
|
|
}
|
|
|
|
type MeterReplacingForm struct {
|
|
OldReading MeterReadingForm `json:"oldReading"`
|
|
NewMeter NewMeterForReplacingForm `json:"newMeter"`
|
|
}
|
|
|
|
type SimplifiedMeterQueryResponse struct {
|
|
Code string `json:"code"`
|
|
Address *string `json:"address"`
|
|
Park string `json:"park"`
|
|
}
|
|
|
|
type SimplifiedMeterDetailResponse struct {
|
|
Code string `json:"code"`
|
|
Park string `json:"parkId"`
|
|
Address *string `json:"address"`
|
|
Seq int64 `json:"seq"`
|
|
Ratio decimal.Decimal `json:"ratio"`
|
|
Building *string `json:"building"`
|
|
BuildingName *string `json:"buildingName"`
|
|
OnFloor *string `json:"onFloor"`
|
|
Area decimal.Decimal `json:"area"`
|
|
Enabled bool `json:"enabled"`
|
|
MeterType int16 `json:"meterType"`
|
|
AttachedAt types.DateTime `json:"attachedAt"`
|
|
DetachedAt *types.DateTime `json:"detachedAt"`
|
|
}
|