package org.synyx.urlaubsverwaltung.application.web;

import org.springframework.beans.BeanUtils;
import org.synyx.urlaubsverwaltung.application.dao.HolidayReplacementEntity;
import org.synyx.urlaubsverwaltung.person.Person;

public class HolidayReplacementDto {

    private Integer id;
    private Person person;
    private String note;

    public HolidayReplacementDto() {
    }

    public HolidayReplacementDto(Person person) {
        this.person = person;
    }


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Person getPerson() {
        return person;
    }

    public void setPerson(Person person) {
        this.person = person;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public static HolidayReplacementDto from(HolidayReplacementEntity holidayReplacementEntity) {
        HolidayReplacementDto holidayReplacementDto = new HolidayReplacementDto();
        BeanUtils.copyProperties(holidayReplacementEntity, holidayReplacementDto);
        return holidayReplacementDto;
    }

    @Override
    public String toString() {
        return "HolidayReplacementDto{" +
            "id=" + id +
            ", person=" + person +
            ", note='" + note + '\'' +
            '}';
    }
}

@@ -261,32 +261,8 @@
  %7B%0A%0A
-    private Integer id;%0A
     
@@ -445,129 +445,8 @@
  %7D%0A%0A
-%0A    public Integer getId() %7B%0A        return id;%0A    %7D%0A%0A    public void setId(Integer id) %7B%0A        this.id = id;%0A    %7D%0A%0A
     
@@ -1113,33 +1113,8 @@
 %22 +%0A
-            %22id=%22 + id +%0A
     

remove unused id attribute from HolidayReplacementDto