|
|
|
@ -3,6 +3,7 @@ package ru.ulstu.timeline.model;
|
|
|
|
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
|
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
|
|
import org.hibernate.validator.constraints.NotBlank;
|
|
|
|
|
import ru.ulstu.conference.model.ConferenceDto;
|
|
|
|
|
import ru.ulstu.paper.model.PaperDto;
|
|
|
|
|
import ru.ulstu.user.model.UserDto;
|
|
|
|
|
|
|
|
|
@ -25,6 +26,7 @@ public class EventDto {
|
|
|
|
|
private final String description;
|
|
|
|
|
private final List<UserDto> recipients;
|
|
|
|
|
private PaperDto paperDto;
|
|
|
|
|
private ConferenceDto conferenceDto;
|
|
|
|
|
|
|
|
|
|
@JsonCreator
|
|
|
|
|
public EventDto(@JsonProperty("id") Integer id,
|
|
|
|
@ -36,7 +38,8 @@ public class EventDto {
|
|
|
|
|
@JsonProperty("updateDate") Date updateDate,
|
|
|
|
|
@JsonProperty("description") String description,
|
|
|
|
|
@JsonProperty("paperDto") PaperDto paperDto,
|
|
|
|
|
@JsonProperty("recipients") List<UserDto> recipients) {
|
|
|
|
|
@JsonProperty("recipients") List<UserDto> recipients,
|
|
|
|
|
@JsonProperty("paperDto") ConferenceDto conferenceDto) {
|
|
|
|
|
this.id = id;
|
|
|
|
|
this.title = title;
|
|
|
|
|
this.period = period;
|
|
|
|
@ -47,6 +50,7 @@ public class EventDto {
|
|
|
|
|
this.description = description;
|
|
|
|
|
this.recipients = recipients;
|
|
|
|
|
this.paperDto = paperDto;
|
|
|
|
|
this.conferenceDto = conferenceDto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public EventDto(Event event) {
|
|
|
|
@ -60,6 +64,7 @@ public class EventDto {
|
|
|
|
|
this.description = event.getDescription();
|
|
|
|
|
this.paperDto = new PaperDto(event.getPaper());
|
|
|
|
|
this.recipients = convert(event.getRecipients(), UserDto::new);
|
|
|
|
|
this.conferenceDto = new ConferenceDto(event.getConference());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Integer getId() {
|
|
|
|
@ -105,4 +110,12 @@ public class EventDto {
|
|
|
|
|
public void setPaperDto(PaperDto paperDto) {
|
|
|
|
|
this.paperDto = paperDto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ConferenceDto getConferenceDto() {
|
|
|
|
|
return conferenceDto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setConferenceDto(ConferenceDto conferenceDto) {
|
|
|
|
|
this.conferenceDto = conferenceDto;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|