feat: start record.
This commit is contained in:
@@ -55,3 +55,24 @@ type MqttGatewayStatusRecord struct {
|
||||
ChargingRatePercentage int32 `json:"chargingRatePercentage"`
|
||||
ReceivedAt int64 `gorm:"type:bigint;index" json:"receivedAt"`
|
||||
}
|
||||
|
||||
type MqttTrainingSessionRecord struct {
|
||||
gorm.Model
|
||||
Identifier string `gorm:"uniqueIndex;size:255" json:"identifier"`
|
||||
Topic string `gorm:"size:255;index" json:"topic"`
|
||||
TestID string `gorm:"size:255;index" json:"testId"`
|
||||
EventType string `gorm:"size:32;index" json:"eventType"`
|
||||
RegionID uint32 `gorm:"index" json:"regionId"`
|
||||
FlavorType string `gorm:"size:64;index" json:"flavorType"`
|
||||
RawFlavor string `gorm:"size:64" json:"rawFlavor"`
|
||||
AppName string `gorm:"size:255" json:"appName"`
|
||||
StartedAt *int64 `gorm:"type:bigint;index" json:"startedAt"`
|
||||
EndedAt *int64 `gorm:"type:bigint;index" json:"endedAt"`
|
||||
PublishedAt int64 `gorm:"type:bigint;index" json:"publishedAt"`
|
||||
ReceivedAt int64 `gorm:"type:bigint;index" json:"receivedAt"`
|
||||
RawPayload string `gorm:"type:text" json:"rawPayload"`
|
||||
}
|
||||
|
||||
func (MqttTrainingSessionRecord) TableName() string {
|
||||
return "mqtt_training_sessions"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user