RoomMember.java 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. package com.ym.pojo;
  2. import lombok.Getter;
  3. import lombok.Setter;
  4. import javax.persistence.*;
  5. import java.util.Date;
  6. /**
  7. * Created by weiqinxiao on 2019/2/28.
  8. */
  9. @Entity
  10. @Table(name = "rongyun_room_member")
  11. public class RoomMember {
  12. @Id
  13. @GeneratedValue(strategy = GenerationType.IDENTITY)
  14. private long id;
  15. private @Getter @Setter String uid;
  16. private @Getter @Setter String rid;
  17. private @Getter @Setter int role;
  18. private @Getter @Setter Date joinDt;
  19. private @Getter @Setter String name;
  20. private @Getter @Setter boolean camera = true;
  21. private @Getter @Setter boolean musicMode = true;
  22. private @Getter @Setter boolean mic = true;
  23. public RoomMember() {
  24. }
  25. public RoomMember(String uid, String rid) {
  26. this.uid = uid;
  27. this.rid = rid;
  28. }
  29. public RoomMember(String uid) {
  30. this.uid = uid;
  31. }
  32. @Override
  33. public String toString() {
  34. return "RoomMember{" +
  35. "uid='" + uid + '\'' +
  36. ", rid='" + rid + '\'' +
  37. ", role=" + role +
  38. ", joinDt=" + joinDt +
  39. ", name='" + name + '\'' +
  40. ", camera=" + camera +
  41. ", musicMode=" + musicMode +
  42. ", mic=" + mic +
  43. '}';
  44. }
  45. //
  46. // @ManyToOne(fetch = FetchType.LAZY)
  47. // @JoinColumn(name = "room_id", referencedColumnName = "rid")
  48. // private @Getter @Setter Room room;
  49. }