64 lines
1.4 KiB
Java
64 lines
1.4 KiB
Java
package de.ph87.homeautomation.schedule.entry;
|
|
|
|
import lombok.Data;
|
|
|
|
import java.time.ZonedDateTime;
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
@Data
|
|
public class ScheduleEntryDto {
|
|
|
|
private long id;
|
|
|
|
private boolean enabled;
|
|
|
|
private boolean monday;
|
|
|
|
private boolean tuesday;
|
|
|
|
private boolean wednesday;
|
|
|
|
private boolean thursday;
|
|
|
|
private boolean friday;
|
|
|
|
private boolean saturday;
|
|
|
|
private boolean sunday;
|
|
|
|
private ScheduleEntryType type;
|
|
|
|
private double zenith;
|
|
|
|
private int hour;
|
|
|
|
private int minute;
|
|
|
|
private int second;
|
|
|
|
private ZonedDateTime nextDateTime;
|
|
|
|
private Map<String, String> properties;
|
|
|
|
public ScheduleEntryDto(final ScheduleEntry scheduleEntry) {
|
|
id = scheduleEntry.getId();
|
|
enabled = scheduleEntry.isEnabled();
|
|
monday = scheduleEntry.isMonday();
|
|
tuesday = scheduleEntry.isTuesday();
|
|
wednesday = scheduleEntry.isWednesday();
|
|
thursday = scheduleEntry.isThursday();
|
|
friday = scheduleEntry.isFriday();
|
|
saturday = scheduleEntry.isSaturday();
|
|
sunday = scheduleEntry.isSunday();
|
|
type = scheduleEntry.getType();
|
|
zenith = scheduleEntry.getZenith();
|
|
hour = scheduleEntry.getHour();
|
|
minute = scheduleEntry.getMinute();
|
|
second = scheduleEntry.getSecond();
|
|
nextDateTime = scheduleEntry.getNextDateTime();
|
|
properties = new HashMap<>(scheduleEntry.getProperties());
|
|
}
|
|
|
|
}
|