Notice.cs 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. using Microsoft.Azure.Cosmos.Table;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Text;
  5. namespace TEAMModelOS.SDK.Models.Table
  6. {
  7. /// <summary>
  8. /// 前端多语言处理
  9. /// </summary>
  10. //public string title { get; set; }
  11. /// <summary>
  12. /// 前端多语言处理
  13. /// </summary>
  14. //public string content { get; set; }
  15. /*
  16. {
  17. "title":"通知标题",
  18. "type":"通知类型",
  19. "level":"重要程度",
  20. "content":"通知内容",
  21. "data":"传输数据josn",
  22. "stime":"发起时间戳",
  23. "etime":"到期时间戳",
  24. "id":"通知id",
  25. "code":"发起人"
  26. "pk":"notice"
  27. }
  28. */
  29. /// <summary>
  30. /// 通知主体存放位置:/notice/{业务id}.json
  31. /// 通知主体存放位置: /notice/{业务id}.json
  32. /// 活跃通知放在CosmosDB Common表中,并设置"ttl":2592000,不能超过30天(2592000),一天(3600),一周(25200),允许删除
  33. /// 过期通知存放至blob中,存放位置, 允许被删除,直接删除记录
  34. /// stuid:/student/stuid/receiver/xxxx时间戳排序.json
  35. /// tmdid:/receiver/xxxx时间戳排序.json
  36. /// </summary>
  37. public class Notice
  38. {
  39. /// <summary>
  40. /// 业务的id
  41. /// </summary>
  42. public string id { get; set; }
  43. /// <summary>
  44. /// Notice-{hbcn/tmdid}
  45. /// </summary>
  46. public string code { get; set; }
  47. public string scode { get; set; }
  48. public string school { get; set; }
  49. public string scope { get; set; }
  50. public string spk { get; set; }
  51. /// <summary>
  52. /// 通知
  53. /// </summary>
  54. public string pk { get; set; } = "Notice";
  55. /// <summary>
  56. /// 类型
  57. /// </summary>
  58. public string type { get; set; }
  59. public int level { get; set; }
  60. public string data { get; set; }
  61. public int stime { get; set; }
  62. public int etime { get; set; }
  63. /// <summary>
  64. /// 被通知的醍摩豆账号
  65. /// </summary>
  66. public List<string> tmdids { get; set; }
  67. /// <summary>
  68. /// 被通知的学校学生账号
  69. /// </summary>
  70. public List<string> stuids { get; set; }
  71. }
  72. /*
  73. {
  74. "id":"通知id"
  75. "code":"接收者1",
  76. "status":"接收状态/已发送/已查看",
  77. "pk":"receiver",
  78. "ttl":2592000,不能超过30天(2592000),一天(3600),一周(25200)
  79. }
  80. */
  81. public class Receiver : CosmosEntity
  82. {
  83. public string pk { get; set; } = "Receiver";
  84. /// <summary>
  85. /// 0 已发送,1已查看,2已处理,-1已过期
  86. /// </summary>
  87. public int status { get; set; }=0;
  88. }
  89. }