perf(User): añadido nombre de usuario a User y unique a email

parent 662ddf13
......@@ -14,5 +14,6 @@ public class User {
private String surname;
private String email;
private String password;
private String username;
}
......@@ -11,7 +11,7 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
public class UserInputDto {
@Size(min = 2, max = 20, message = "El nombre debe tener entre 6 y 20 caracteres")
@Size(min = 2, max = 20, message = "El nombre debe tener entre 2 y 20 caracteres")
private String name;
@Size(min = 6, max = 20, message = "Los apellidos deben tener entre 6 y 20 caracteres")
......@@ -23,4 +23,6 @@ public class UserInputDto {
@Size(min = 8, message = "La contraseña debe tener al menos 8 caracteres")
private String password;
private String username;
}
......@@ -13,5 +13,6 @@ public class UserOutputDto {
private String name;
private String surname;
private String email;
private String username;
}
......@@ -21,10 +21,13 @@ public class UserJpa {
@Column(name = "apellidos")
private String surname;
@Column(name = "email")
@Column(name = "email", unique = true)
private String email;
@Column(name = "password")
private String password;
@Column(name = "usuario", unique = true)
private String username;
}
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 sign in to comment