Homeautomation/src/main/java/de/ph87/homeautomation/schedule/ScheduleDto.java

33 lines
783 B
Java

package de.ph87.homeautomation.schedule;
import de.ph87.homeautomation.schedule.astro.AstroDto;
import de.ph87.homeautomation.schedule.entry.ScheduleEntryDto;
import lombok.Getter;
import java.io.Serializable;
import java.util.List;
import java.util.Set;
@Getter
public class ScheduleDto implements Serializable {
private final long id;
private final boolean enabled;
private final String title;
private final Set<ScheduleEntryDto> entries;
private final List<AstroDto> astros;
public ScheduleDto(final Schedule schedule, final Set<ScheduleEntryDto> entries, final List<AstroDto> astros) {
this.id = schedule.getId();
this.enabled = schedule.isEnabled();
this.title = schedule.getTitle();
this.entries = entries;
this.astros = astros;
}
}