dev.azure.com/aidainnovazione0090/DeviceManager/_git/go-mod-core-contracts@v1.0.2/dtos/labels.go (about) 1 package dtos 2 3 import "dev.azure.com/aidainnovazione0090/DeviceManager/_git/go-mod-core-contracts/models" 4 5 type LabelsWithDeviceCount struct { 6 Label string `json:"label"` 7 DeviceCount int `json:"deviceCount"` 8 } 9 10 func FromLabelWithDeviceCountModelToDTO(m models.LabelsWithDeviceCount) LabelsWithDeviceCount { 11 var l LabelsWithDeviceCount 12 l.Label = m.Labels 13 l.DeviceCount = m.DeviceCount 14 return l 15 } 16 17 func FromLabelWithDeviceCountDTOToModel(l LabelsWithDeviceCount) models.LabelsWithDeviceCount { 18 var m models.LabelsWithDeviceCount 19 m.DeviceCount = l.DeviceCount 20 m.Labels = l.Label 21 return m 22 }