RoomInfo.cs 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. namespace ShadowStudio.Model
  5. {
  6. /// <summary>
  7. /// 房间权限
  8. /// </summary>
  9. public enum RoomPermissions
  10. {
  11. /// <summary>
  12. /// 私人房间,仅个人可看
  13. /// </summary>
  14. Private = 0,
  15. /// <summary>
  16. /// 公共可读
  17. /// </summary>
  18. OnlyRead = 1,
  19. /// <summary>
  20. /// 公共可写
  21. /// </summary>
  22. Writable = 2
  23. }
  24. /// <summary>
  25. /// Room Infos
  26. /// 房间信息,数据结构
  27. /// </summary>
  28. public class RoomInfo
  29. {
  30. /// <summary>
  31. /// 房间id
  32. /// </summary>
  33. private string roomId;
  34. /// <summary>
  35. /// 房间号
  36. /// </summary>
  37. private string roomNum;
  38. /// <summary>
  39. /// 房间名称
  40. /// </summary>
  41. private string roomName;
  42. /// <summary>
  43. /// 访问权限
  44. /// </summary>
  45. private RoomPermissions permissions;
  46. /// <summary>
  47. /// 房间密码
  48. /// </summary>
  49. private string password;
  50. /// <summary>
  51. /// 房间活跃度
  52. /// </summary>
  53. private string activity;
  54. /// <summary>
  55. /// 房间拥有者
  56. /// </summary>
  57. private string ownerId;
  58. /// <summary>
  59. /// 物品的集合体,因为数据量可能很大,不在此使用完整的结构体引用
  60. /// </summary>
  61. private List<string> goodsList;
  62. public string RoomId { get => roomId; set => roomId = value; }
  63. public string RoomNum { get => roomNum; set => roomNum = value; }
  64. public string RoomName { get => roomName; set => roomName = value; }
  65. public RoomPermissions Permissions { get => permissions; set => permissions = value; }
  66. public string Password { get => password; set => password = value; }
  67. public string Activity { get => activity; set => activity = value; }
  68. public string OwnerId { get => ownerId; set => ownerId = value; }
  69. public List<string> GoodsList { get => goodsList; set => goodsList = value; }
  70. }
  71. }