device_collection.go
737 字节
package transform
import (
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/domain"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/infrastructure/pg/models"
)
func TransformToDeviceCollectionDomainModelFromPgModels(deviceCollectionModel *models.DeviceCollection) (*domain.DeviceCollection, error) {
return &domain.DeviceCollection{
DeviceCollectionId: deviceCollectionModel.DeviceCollectionId,
WorkShopName: deviceCollectionModel.WorkShopName,
DeviceSn: deviceCollectionModel.DeviceSn,
StartupStatus: deviceCollectionModel.StartupStatus,
ComStatus: deviceCollectionModel.ComStatus,
Values: deviceCollectionModel.Values,
}, nil
}