Add aspirant model
This commit is contained in:
parent
10f65e11a2
commit
6ad4ea0083
110
src/main/java/ru/ulstu/admin/model/AspirantForm.java
Normal file
110
src/main/java/ru/ulstu/admin/model/AspirantForm.java
Normal file
@ -0,0 +1,110 @@
|
||||
package ru.ulstu.admin.model;
|
||||
|
||||
import ru.ulstu.aspirant.model.Base;
|
||||
import ru.ulstu.aspirant.model.Speciality;
|
||||
import ru.ulstu.indicator.model.Course;
|
||||
import ru.ulstu.manager.model.Manager;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class AspirantForm {
|
||||
private Integer id;
|
||||
|
||||
private String surname;
|
||||
|
||||
private String name;
|
||||
|
||||
private String patronymic;
|
||||
|
||||
private Course course;
|
||||
|
||||
private Manager manager;
|
||||
|
||||
private Date birthDate;
|
||||
|
||||
private Speciality speciality;
|
||||
|
||||
private String theme;
|
||||
|
||||
private Base base;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getSurname() {
|
||||
return surname;
|
||||
}
|
||||
|
||||
public void setSurname(String surname) {
|
||||
this.surname = surname;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPatronymic() {
|
||||
return patronymic;
|
||||
}
|
||||
|
||||
public void setPatronymic(String patronymic) {
|
||||
this.patronymic = patronymic;
|
||||
}
|
||||
|
||||
public Course getCourse() {
|
||||
return course;
|
||||
}
|
||||
|
||||
public void setCourse(Course course) {
|
||||
this.course = course;
|
||||
}
|
||||
|
||||
public Manager getManager() {
|
||||
return manager;
|
||||
}
|
||||
|
||||
public void setManager(Manager manager) {
|
||||
this.manager = manager;
|
||||
}
|
||||
|
||||
public Date getBirthDate() {
|
||||
return birthDate;
|
||||
}
|
||||
|
||||
public void setBirthDate(Date birthDate) {
|
||||
this.birthDate = birthDate;
|
||||
}
|
||||
|
||||
public Speciality getSpeciality() {
|
||||
return speciality;
|
||||
}
|
||||
|
||||
public void setSpeciality(Speciality speciality) {
|
||||
this.speciality = speciality;
|
||||
}
|
||||
|
||||
public String getTheme() {
|
||||
return theme;
|
||||
}
|
||||
|
||||
public void setTheme(String theme) {
|
||||
this.theme = theme;
|
||||
}
|
||||
|
||||
public Base getBase() {
|
||||
return base;
|
||||
}
|
||||
|
||||
public void setBase(Base base) {
|
||||
this.base = base;
|
||||
}
|
||||
}
|
121
src/main/java/ru/ulstu/aspirant/model/Aspirant.java
Normal file
121
src/main/java/ru/ulstu/aspirant/model/Aspirant.java
Normal file
@ -0,0 +1,121 @@
|
||||
package ru.ulstu.aspirant.model;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.EnumType;
|
||||
import jakarta.persistence.Enumerated;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
import jakarta.persistence.Temporal;
|
||||
import jakarta.persistence.TemporalType;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import ru.ulstu.admin.model.AspirantForm;
|
||||
import ru.ulstu.indicator.model.Course;
|
||||
import ru.ulstu.manager.model.Manager;
|
||||
import ru.ulstu.model.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Entity
|
||||
public class Aspirant extends BaseEntity {
|
||||
@NotEmpty
|
||||
private String surname;
|
||||
|
||||
@NotEmpty
|
||||
private String name;
|
||||
|
||||
private String patronymic;
|
||||
|
||||
@NotNull
|
||||
private Course course;
|
||||
|
||||
@ManyToOne
|
||||
private Manager manager;
|
||||
|
||||
@Temporal(TemporalType.DATE)
|
||||
private Date birthDate;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private Speciality speciality;
|
||||
|
||||
private String theme;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private Base base;
|
||||
|
||||
public Aspirant(AspirantForm aspirantForm) {
|
||||
this.name = aspirantForm.getName();
|
||||
|
||||
}
|
||||
|
||||
public String getSurname() {
|
||||
return surname;
|
||||
}
|
||||
|
||||
public void setSurname(String surname) {
|
||||
this.surname = surname;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPatronymic() {
|
||||
return patronymic;
|
||||
}
|
||||
|
||||
public void setPatronymic(String patronymic) {
|
||||
this.patronymic = patronymic;
|
||||
}
|
||||
|
||||
public Course getCourse() {
|
||||
return course;
|
||||
}
|
||||
|
||||
public void setCourse(Course course) {
|
||||
this.course = course;
|
||||
}
|
||||
|
||||
public Manager getManager() {
|
||||
return manager;
|
||||
}
|
||||
|
||||
public void setManager(Manager manager) {
|
||||
this.manager = manager;
|
||||
}
|
||||
|
||||
public Date getBirthDate() {
|
||||
return birthDate;
|
||||
}
|
||||
|
||||
public void setBirthDate(Date birthDate) {
|
||||
this.birthDate = birthDate;
|
||||
}
|
||||
|
||||
public Speciality getSpeciality() {
|
||||
return speciality;
|
||||
}
|
||||
|
||||
public void setSpeciality(Speciality speciality) {
|
||||
this.speciality = speciality;
|
||||
}
|
||||
|
||||
public String getTheme() {
|
||||
return theme;
|
||||
}
|
||||
|
||||
public void setTheme(String theme) {
|
||||
this.theme = theme;
|
||||
}
|
||||
|
||||
public Base getBase() {
|
||||
return base;
|
||||
}
|
||||
|
||||
public void setBase(Base base) {
|
||||
this.base = base;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user