Guest User

Untitled

a guest
Nov 28th, 2018
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. package in.springframework.blog.tutorials;
  2.  
  3. import javax.persistence.*;
  4.  
  5. @Entity
  6. @Table(name = "user",
  7. uniqueConstraints =
  8. {
  9. @UniqueConstraint(name = "uq_email", columnNames = {"email"}),
  10. @UniqueConstraint(name = "uq_username", columnNames = {"username"})
  11. })
  12. public class User {
  13.  
  14. @Id
  15. @GeneratedValue(strategy=GenerationType.AUTO)
  16. private Long id;
  17. private String fullname;
  18. private String username;
  19. private String password;
  20. private String email;
  21.  
  22.  
  23. public Long getId() {
  24. return id;
  25. }
  26.  
  27. public void setId(Long id) {
  28. this.id = id;
  29. }
  30.  
  31. public String getFullname() {
  32. return fullname;
  33. }
  34.  
  35. public void setFullname(String fullname) {
  36. this.fullname = fullname;
  37. }
  38.  
  39. public String getUsername() {
  40. return username;
  41. }
  42.  
  43. public void setUsername(String username) {
  44. this.username = username;
  45. }
  46.  
  47. public String getPassword() {
  48. return password;
  49. }
  50.  
  51. public void setPassword(String password) {
  52. this.password = password;
  53. }
  54.  
  55. public String getEmail() {
  56. return email;
  57. }
  58.  
  59. public void setEmail(String email) {
  60. this.email = email;
  61. }
  62. }
Add Comment
Please, Sign In to add comment