Created
January 16, 2022 14:57
-
-
Save iamprafful/0002ba8bacaea325ecba02e096db6485 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.api.model; | |
import lombok.AllArgsConstructor; | |
import lombok.Getter; | |
import lombok.NoArgsConstructor; | |
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("users") | |
@Getter | |
@Setter | |
@AllArgsConstructor | |
@NoArgsConstructor | |
public class User { | |
@Id | |
private String userName; | |
private String firstName; | |
private String lastName; | |
@Indexed(unique = true) | |
private String email; | |
private String password; | |
private String role; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment