models

package
v0.0.0-...-32b758b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2023 License: GPL-2.0, GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ElectricityCollectionIndexes

func ElectricityCollectionIndexes() []mongo.IndexModel

Types

type ElectricityBill

type ElectricityBill struct {
	ID               primitive.ObjectID    `bson:"_id" json:"id"`
	ServiceId        string                `bson:"service_id" json:"serviceId"` // Id do documento no banco de dados da aplicação principal
	Year             uint16                `bson:"year" json:"year"`
	Month            uint8                 `bson:"month" json:"month"`
	PeakKWH          float32               `bson:"peak_kWh" json:"peakKWH"`
	PeakUnitPrice    float32               `bson:"peak_unit_price" json:"peakUnitPrice"`
	PeakTotal        float32               `bson:"peak_total" json:"peakTotal"`
	OffpeakKWH       float32               `bson:"offpeak_kWh" json:"offpeakKWH"`
	OffpeakUnitPrice float32               `bson:"offpeak_unit_price" json:"offpeakUnitPrice"`
	OffpeakTotal     float32               `bson:"offpeak_total" json:"offpeakTotal"`
	TotalPrice       float32               `bson:"total_price" json:"totalPrice"`
	Items            []ElectricityBillItem `bson:"items" json:"items"`
}

type ElectricityBillItem

type ElectricityBillItem struct {
	Label string  `bson:"label" json:"label"`
	Cost  float32 `bson:"cost" json:"cost"`
}

type ErrorResponse

type ErrorResponse struct {
	Message   string `json:"message"`
	Action    string `json:"action"`
	ErrorCode string `json:"errorCode"`
}

type Response

type Response struct {
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL