package com.ruoyi.device.service.convert; import com.ruoyi.common.core.utils.BaseConvert; import com.ruoyi.device.domain.model.Device; import com.ruoyi.device.service.dto.DeviceDTO; import java.util.List; /** * 设备Service层转换器 * Service DTO ↔ Domain Model * * @author ruoyi * @date 2026-01-16 */ public class DeviceDTOConvert extends BaseConvert { private static final DeviceDTOConvert INSTANCE = new DeviceDTOConvert(); private DeviceDTOConvert() { super(Device.class, DeviceDTO.class); } /** * Model 转 DTO */ public static DeviceDTO from(Device model) { return INSTANCE.innerFrom(model); } /** * DTO 转 Model */ public static Device to(DeviceDTO dto) { return INSTANCE.innerTo(dto); } /** * Model List 转 DTO List */ public static List fromList(List modelList) { return INSTANCE.innerFromList(modelList); } /** * DTO List 转 Model List */ public static List toList(List dtoList) { return INSTANCE.innerToList(dtoList); } }