Commit ae45ad97 authored by Spiros Koulouzis's avatar Spiros Koulouzis

fixed user

parent 40851014
package io.swagger.model; package nl.uva.sne.drip.model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import java.util.Objects; import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.data.annotation.Id; import org.springframework.data.annotation.Id;
...@@ -9,24 +10,178 @@ import org.springframework.data.annotation.Id; ...@@ -9,24 +10,178 @@ import org.springframework.data.annotation.Id;
* User * User
*/ */
@Validated @Validated
@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2019-12-10T15:39:04.296Z") @javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2019-12-11T11:37:55.458Z")
public class User { public class User {
public String getId() { @JsonProperty("id")
return id; @Id
private String id = null;
@JsonProperty("username")
private String username = null;
@JsonProperty("firstName")
private String firstName = null;
@JsonProperty("lastName")
private String lastName = null;
@JsonProperty("email")
private String email = null;
@JsonProperty("password")
private String password = null;
@JsonProperty("userStatus")
private Integer userStatus = null;
public User id(String id) {
this.id = id;
return this;
} }
/** /**
* @param id the id to set * Get id
*
* @return id
*
*/ */
@ApiModelProperty(value = "")
public String getId() {
return id;
}
public void setId(String id) { public void setId(String id) {
this.id = id; this.id = id;
} }
@Id public User username(String username) {
@JsonIgnore this.username = username;
private String id; return this;
}
/**
* Get username
*
* @return username
*
*/
@ApiModelProperty(value = "")
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public User firstName(String firstName) {
this.firstName = firstName;
return this;
}
/**
* Get firstName
*
* @return firstName
*
*/
@ApiModelProperty(value = "")
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public User lastName(String lastName) {
this.lastName = lastName;
return this;
}
/**
* Get lastName
*
* @return lastName
*
*/
@ApiModelProperty(value = "")
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public User email(String email) {
this.email = email;
return this;
}
/**
* Get email
*
* @return email
*
*/
@ApiModelProperty(value = "")
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public User password(String password) {
this.password = password;
return this;
}
/**
* Get password
*
* @return password
*
*/
@ApiModelProperty(value = "")
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public User userStatus(Integer userStatus) {
this.userStatus = userStatus;
return this;
}
/**
* User Status
*
* @return userStatus
*
*/
@ApiModelProperty(value = "User Status")
public Integer getUserStatus() {
return userStatus;
}
public void setUserStatus(Integer userStatus) {
this.userStatus = userStatus;
}
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {
...@@ -36,12 +191,19 @@ public class User { ...@@ -36,12 +191,19 @@ public class User {
if (o == null || getClass() != o.getClass()) { if (o == null || getClass() != o.getClass()) {
return false; return false;
} }
return true; User user = (User) o;
return Objects.equals(this.id, user.id)
&& Objects.equals(this.username, user.username)
&& Objects.equals(this.firstName, user.firstName)
&& Objects.equals(this.lastName, user.lastName)
&& Objects.equals(this.email, user.email)
&& Objects.equals(this.password, user.password)
&& Objects.equals(this.userStatus, user.userStatus);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(); return Objects.hash(id, username, firstName, lastName, email, password, userStatus);
} }
@Override @Override
...@@ -49,6 +211,13 @@ public class User { ...@@ -49,6 +211,13 @@ public class User {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class User {\n"); sb.append("class User {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" username: ").append(toIndentedString(username)).append("\n");
sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n");
sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n");
sb.append(" email: ").append(toIndentedString(email)).append("\n");
sb.append(" password: ").append(toIndentedString(password)).append("\n");
sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n");
sb.append("}"); sb.append("}");
return sb.toString(); return sb.toString();
} }
......
...@@ -20,6 +20,7 @@ import org.springframework.web.multipart.MultipartFile; ...@@ -20,6 +20,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.validation.Valid; import javax.validation.Valid;
import javax.validation.constraints.*; import javax.validation.constraints.*;
import java.util.List; import java.util.List;
import nl.uva.sne.drip.model.User;
@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2019-12-06T13:31:49.386Z") @javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2019-12-06T13:31:49.386Z")
@Api(value = "user", description = "the user API") @Api(value = "user", description = "the user API")
......
package nl.uva.sne.drip.api; package nl.uva.sne.drip.api;
import nl.uva.sne.drip.model. import nl.uva.sne.drip.model.User;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import org.slf4j.Logger; import org.slf4j.Logger;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment