Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseModelSoftDeleted ¶
type GroupSensor ¶
type GroupSensor struct { GroupLabel string `gorm:"not null"` GroupTh uint32 `gorm:"not null"` NodeID uint64 `gorm:"not null"` }
func (GroupSensor) TableName ¶
func (GroupSensor) TableName() string
type GroupSensors ¶
type GroupSensors []GroupSensor
type Node ¶
type Node struct { ID uint64 `gorm:"PRIMARY_KEY"` Type string `gorm:"not null"` Label string `gorm:"not null"` Token string `gorm:"not null"` Location *string BaseModelSoftDeleted }
func NewNodeFromCreateDTO ¶
func (Node) ToResponseDTO ¶
func (n Node) ToResponseDTO() nodeDTO.ResponseDTO
type NodeSensor ¶
type NodeSensor struct { ID uint64 `gorm:"PRIMARY_KEY"` Code string `gorm:"not null"` Description string Category string `gorm:"not null"` Unit string `gorm:"not null"` GroupLabel string `gorm:"not null"` GroupTh uint32 `gorm:"not null"` NodeID uint64 `gorm:"not null"` IsActive bool `gorm:"not null"` BaseModelSoftDeleted }
func NewSensorFromCreateDTO ¶
func NewSensorFromCreateDTO(c nodeSensorDTO.CreateDTO, groupTh uint32) NodeSensor
func (*NodeSensor) BeforeCreate ¶
func (ns *NodeSensor) BeforeCreate(tx *gorm.DB) error
func (NodeSensor) TableName ¶
func (NodeSensor) TableName() string
func (NodeSensor) ToResponseDTO ¶
func (ns NodeSensor) ToResponseDTO() nodeSensorDTO.ResponseDTO
type NodeSensors ¶
type NodeSensors []NodeSensor
func (NodeSensors) TableName ¶
func (NodeSensors) TableName() string
func (NodeSensors) ToResponsesDTO ¶
func (nss NodeSensors) ToResponsesDTO() []nodeSensorDTO.ResponseDTO
type Nodes ¶
type Nodes []Node
func (Nodes) ToResponsesDTO ¶
func (ns Nodes) ToResponsesDTO() []nodeDTO.ResponseDTO
type SensorData ¶
type SensorData struct { ID uint64 `gorm:"PRIMARY_KEY"` NodeID uint64 `gorm:"not null"` NodeLabel string `gorm:"not null"` Code string `gorm:"not null"` Category string `gorm:"not null"` Value float64 `gorm:"not null"` Unit string `gorm:"not null"` GroupLabel string `gorm:"not null"` GroupTh uint32 `gorm:"not null"` Timestamp time.Time `gorm:"not null"` BaseModel }
func NewFromCreateDTO ¶
func NewFromCreateDTO(s sensorDataDTO.CreateDTO) SensorData
func (SensorData) TableName ¶
func (SensorData) TableName() string
func (SensorData) ToResponseDTO ¶
func (s SensorData) ToResponseDTO() sensorDataDTO.ResponseDTO
type SensorDataList ¶
type SensorDataList []SensorData
func NewFromCreatesDTO ¶
func NewFromCreatesDTO(ss []sensorDataDTO.CreateDTO) SensorDataList
func (SensorDataList) Len ¶
func (sdl SensorDataList) Len() int
func (SensorDataList) ToResponsesDTO ¶
func (sdl SensorDataList) ToResponsesDTO() []sensorDataDTO.ResponseDTO
type User ¶
type User struct { ID uint64 `gorm:"primaryKey;autoIncrement"` Username string `gorm:"not null"` Password string `gorm:"not null"` CreatedAt time.Time `gorm:"not null"` CreatedBy string `gorm:"not null"` UpdatedAt *time.Time UpdatedBy *string }
func NewUserFromCreateDTO ¶
func (User) ToResponseDTO ¶
func (u User) ToResponseDTO() userDTO.ResponseDTO
func (User) ToTokenResponseDTO ¶
func (u User) ToTokenResponseDTO(token string) userDTO.TokenResponseDTO
Click to show internal directories.
Click to hide internal directories.