feat(user): añadido enumerado de rol a User y UserDocument

parent b6198aaa
......@@ -15,5 +15,6 @@ public class User {
private String email;
private String password;
private String username;
private Role role;
}
package com.example.apprecetas.user.infrastructure.repository.mongodb;
import com.example.apprecetas.user.domain.entity.Role;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
@Document(collection = "users")
@Getter
@Setter
......@@ -24,4 +24,7 @@ public class UserDocument {
@Indexed(unique = true)
private String username;
private Role role;
}
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