22 lines
406 B
Java
22 lines
406 B
Java
package de.ph87.homeautomation.device;
|
|
|
|
import de.ph87.homeautomation.device.devices.Device;
|
|
import lombok.Getter;
|
|
|
|
@Getter
|
|
public abstract class DeviceDto {
|
|
|
|
public final long id;
|
|
|
|
public final String name;
|
|
|
|
public final String type;
|
|
|
|
public DeviceDto(final Device device) {
|
|
this.id = device.getId();
|
|
this.name = device.getName();
|
|
this.type = device.getClass().getSimpleName();
|
|
}
|
|
|
|
}
|