package de.ph87.homeautomation.schedule; import de.ph87.homeautomation.schedule.entry.ScheduleEntryDto; import lombok.Getter; import java.io.Serializable; 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 entries; public ScheduleDto(final Schedule schedule, final Set entries) { this.id = schedule.getId(); this.enabled = schedule.isEnabled(); this.title = schedule.getTitle(); this.entries = entries; } }