#42 rename birth_date column
This commit is contained in:
parent
e8461e26eb
commit
f7d766f02d
@ -85,9 +85,9 @@ public class User extends BaseEntity {
|
|||||||
@BatchSize(size = 20)
|
@BatchSize(size = 20)
|
||||||
private Set<UserRole> roles;
|
private Set<UserRole> roles;
|
||||||
|
|
||||||
@Column(name = "birth_year")
|
@Column(name = "birth_date")
|
||||||
@Temporal(TemporalType.TIMESTAMP)
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
private Date birthYear;
|
private Date birthDate;
|
||||||
|
|
||||||
public enum UserDegree {
|
public enum UserDegree {
|
||||||
CANDIDATE("Кандидат технических наук"),
|
CANDIDATE("Кандидат технических наук"),
|
||||||
@ -211,12 +211,12 @@ public class User extends BaseEntity {
|
|||||||
this.patronymic = patronymic;
|
this.patronymic = patronymic;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getBirthYear() {
|
public Date getBirthDate() {
|
||||||
return birthYear;
|
return birthDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBirthYear(Date birthYear) {
|
public void setBirthDate(Date birthDate) {
|
||||||
this.birthYear = birthYear;
|
this.birthDate = birthDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public UserDegree getDegree() {
|
public UserDegree getDegree() {
|
||||||
|
@ -71,7 +71,7 @@ public class UserDto implements OdinDto {
|
|||||||
@Size(min = Constants.MIN_PASSWORD_LENGTH, max = 50)
|
@Size(min = Constants.MIN_PASSWORD_LENGTH, max = 50)
|
||||||
private String passwordConfirm;
|
private String passwordConfirm;
|
||||||
|
|
||||||
private Date birthYear;
|
private Date birthDate;
|
||||||
|
|
||||||
private User.UserDegree degree;
|
private User.UserDegree degree;
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ public class UserDto implements OdinDto {
|
|||||||
this.roles.addAll(user.getRoles().stream()
|
this.roles.addAll(user.getRoles().stream()
|
||||||
.map(UserRoleDto::new)
|
.map(UserRoleDto::new)
|
||||||
.collect(Collectors.toList()));
|
.collect(Collectors.toList()));
|
||||||
this.birthYear = user.getBirthYear();
|
this.birthDate = user.getBirthDate();
|
||||||
this.degree = user.getDegree();
|
this.degree = user.getDegree();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -170,12 +170,12 @@ public class UserDto implements OdinDto {
|
|||||||
return passwordConfirm;
|
return passwordConfirm;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getBirthYear() {
|
public Date getBirthDate() {
|
||||||
return birthYear;
|
return birthDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBirthYear(Date birthYear) {
|
public void setBirthDate(Date birthDate) {
|
||||||
this.birthYear = birthYear;
|
this.birthDate = birthDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public User.UserDegree getDegree() {
|
public User.UserDegree getDegree() {
|
||||||
@ -211,7 +211,7 @@ public class UserDto implements OdinDto {
|
|||||||
", roles=" + roles +
|
", roles=" + roles +
|
||||||
", password='" + password + '\'' +
|
", password='" + password + '\'' +
|
||||||
", passwordConfirm='" + passwordConfirm + '\'' +
|
", passwordConfirm='" + passwordConfirm + '\'' +
|
||||||
", birthYear='" + birthYear + '\'' +
|
", birthDate='" + birthDate + '\'' +
|
||||||
", degree='" + degree + '\'' +
|
", degree='" + degree + '\'' +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
|
||||||
<changeSet author="tanya" id="20190404_000000-1">
|
<changeSet author="tanya" id="20190404_000000-1">
|
||||||
<addColumn tableName="users">
|
<addColumn tableName="users">
|
||||||
<column name="birth_year" type="timestamp"></column>
|
<column name="birth_date" type="timestamp"></column>
|
||||||
</addColumn>
|
</addColumn>
|
||||||
<addColumn tableName="users">
|
<addColumn tableName="users">
|
||||||
<column name="degree" type="varchar(255)"></column>
|
<column name="degree" type="varchar(255)"></column>
|
||||||
|
Loading…
Reference in New Issue
Block a user