device_collection.go
968 字节
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,
DeviceType: deviceCollectionModel.DeviceType,
StartupStatus: deviceCollectionModel.StartupStatus,
CollectionTime: deviceCollectionModel.CreatedAt,
ComStatus: deviceCollectionModel.ComStatus,
Values: deviceCollectionModel.Values,
ProductCount: deviceCollectionModel.ProductCount,
LatestUpdateTime: deviceCollectionModel.LatestUpdateTime,
}, nil
}