Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #5 from bjchen2/master
Browse files Browse the repository at this point in the history
change some type about user
  • Loading branch information
bjchen2 authored Oct 27, 2018
2 parents 353215d + 0c527b5 commit 2e00d19
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/main/java/com/wizzstudio/substitute/pojo/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,10 @@ public class User implements Serializable {
@NotNull
private String userName;

//用户真实姓名
private String trueName;

//电话号码
private Long phone;

//用户头像url
@NotNull
private String avatar;

//学校
private String school;

//用户性别,男:”MALE”,女:”FAMALE”,未知:”NO_LIMITED”
@Enumerated(EnumType.STRING)
@NotNull
Expand All @@ -58,6 +49,15 @@ public class User implements Serializable {
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
private Role role;

//用户真实姓名
private String trueName;

//电话号码
private Long phone;

//学校Id
private Integer schoolId;

/**
* 余额
*/
Expand Down Expand Up @@ -90,7 +90,7 @@ private User(Builder builder) {
setTrueName(builder.trueName);
setPhone(builder.phone);
setAvatar(builder.avatar);
setSchool(builder.school);
setSchoolId(builder.schoolId);
setGender(builder.gender);
setRole(builder.role);
setBalance(builder.balance);
Expand All @@ -113,7 +113,7 @@ public static Builder newBuilder(User copy) {
builder.trueName = copy.getTrueName();
builder.phone = copy.getPhone();
builder.avatar = copy.getAvatar();
builder.school = copy.getSchool();
builder.schoolId = copy.getSchoolId();
builder.gender = copy.getGender();
builder.role = copy.getRole();
builder.balance = copy.getBalance();
Expand All @@ -133,7 +133,7 @@ public static final class Builder {
private String trueName;
private Long phone;
private @NotNull String avatar;
private String school;
private Integer schoolId;
private @NotNull Gender gender;
private @NotNull Role role;
private @NotNull BigDecimal balance;
Expand Down Expand Up @@ -180,8 +180,8 @@ public Builder setAvatar(@NotNull String avatar) {
return this;
}

public Builder setSchool(String school) {
this.school = school;
public Builder setSchool(Integer schoolId) {
this.schoolId = schoolId;
return this;
}

Expand Down

0 comments on commit 2e00d19

Please sign in to comment.