Role.java 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. package com.api.base.model;
  2. import javax.persistence.GeneratedValue;
  3. import javax.persistence.GenerationType;
  4. import javax.persistence.Id;
  5. import javax.persistence.Table;
  6. import java.io.Serializable;
  7. @Table(name = "sys_role")
  8. public class Role implements Serializable {
  9. @Id
  10. @GeneratedValue(strategy = GenerationType.IDENTITY)
  11. private Long id;
  12. private String name;
  13. private String description;
  14. public Role(String name, String description) {
  15. this.name = name;
  16. this.description = description;
  17. }
  18. public Role() {
  19. }
  20. public Long getId() {
  21. return id;
  22. }
  23. public void setId(Long id) {
  24. this.id = id;
  25. }
  26. /**
  27. * @return name
  28. */
  29. public String getName() {
  30. return name;
  31. }
  32. /**
  33. * @param name
  34. */
  35. public void setName(String name) {
  36. this.name = name;
  37. }
  38. /**
  39. * @return description
  40. */
  41. public String getDescription() {
  42. return description;
  43. }
  44. /**
  45. * @param description
  46. */
  47. public void setDescription(String description) {
  48. this.description = description;
  49. }
  50. }