Generate question bank domain model from JDL
This commit is contained in:
1 parent
1d97cc4e31
commit
1d74d8f04b
160 files changed
+26900
-2
No files matched your search
@@ -0,0 +1,124 @@
|
||||
package com.example.questionbank.service.dto;
|
||||
|
||||
import com.example.questionbank.domain.enumeration.AttemptStatus;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.io.Serializable;
|
||||
import java.time.Instant;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* A DTO for the {@link com.example.questionbank.domain.ExamAttempt} entity.
|
||||
*/
|
||||
@SuppressWarnings("common-java:DuplicatedBlocks")
|
||||
public class ExamAttemptDTO implements Serializable {
|
||||
|
||||
private Long id;
|
||||
|
||||
@NotNull
|
||||
private Instant startedAt;
|
||||
|
||||
private Instant submittedAt;
|
||||
|
||||
@NotNull
|
||||
private AttemptStatus status;
|
||||
|
||||
@Min(value = 0)
|
||||
private Integer score;
|
||||
|
||||
@NotNull
|
||||
private SubjectDTO subject;
|
||||
|
||||
@NotNull
|
||||
private UserDTO user;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Instant getStartedAt() {
|
||||
return startedAt;
|
||||
}
|
||||
|
||||
public void setStartedAt(Instant startedAt) {
|
||||
this.startedAt = startedAt;
|
||||
}
|
||||
|
||||
public Instant getSubmittedAt() {
|
||||
return submittedAt;
|
||||
}
|
||||
|
||||
public void setSubmittedAt(Instant submittedAt) {
|
||||
this.submittedAt = submittedAt;
|
||||
}
|
||||
|
||||
public AttemptStatus getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(AttemptStatus status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getScore() {
|
||||
return score;
|
||||
}
|
||||
|
||||
public void setScore(Integer score) {
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public SubjectDTO getSubject() {
|
||||
return subject;
|
||||
}
|
||||
|
||||
public void setSubject(SubjectDTO subject) {
|
||||
this.subject = subject;
|
||||
}
|
||||
|
||||
public UserDTO getUser() {
|
||||
return user;
|
||||
}
|
||||
|
||||
public void setUser(UserDTO user) {
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof ExamAttemptDTO)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ExamAttemptDTO examAttemptDTO = (ExamAttemptDTO) o;
|
||||
if (this.id == null) {
|
||||
return false;
|
||||
}
|
||||
return Objects.equals(this.id, examAttemptDTO.id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(this.id);
|
||||
}
|
||||
|
||||
// prettier-ignore
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ExamAttemptDTO{" +
|
||||
"id=" + getId() +
|
||||
", startedAt='" + getStartedAt() + "'" +
|
||||
", submittedAt='" + getSubmittedAt() + "'" +
|
||||
", status='" + getStatus() + "'" +
|
||||
", score=" + getScore() +
|
||||
", subject=" + getSubject() +
|
||||
", user=" + getUser() +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user