ESPostReadRecordModel.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace JiaZhiQuan.Common.ElasticSearch.Models
  5. {
  6. /*
  7. DELETE /postreadrecord
  8. PUT /postreadrecord
  9. {
  10. "mappings": {
  11. "properties": {
  12. "notValidRecord": {
  13. "type": "boolean"
  14. },
  15. "isMock": {
  16. "type": "boolean"
  17. },
  18. "postId": {
  19. "type": "long"
  20. },
  21. "authorId": {
  22. "type": "long"
  23. },
  24. "categoryType": {
  25. "type": "integer"
  26. },
  27. "isAuthor": {
  28. "type": "boolean"
  29. },
  30. "isFan": {
  31. "type": "boolean"
  32. },
  33. "userId": {
  34. "type": "long"
  35. },
  36. "ip": {
  37. "type": "keyword"
  38. },
  39. "clientId": {
  40. "type": "keyword"
  41. },
  42. "createAt": {
  43. "type": "date",
  44. "format": "yyyy-MM-dd HH:mm:ss"
  45. }
  46. }
  47. }
  48. }
  49. */
  50. /// <summary>
  51. /// 有效的阅读记录
  52. /// </summary>
  53. public class ESPostReadRecordModel
  54. {
  55. /// <summary>
  56. /// 是否不是有效阅读
  57. /// </summary>
  58. public bool notValidRecord { get; set; }
  59. /// <summary>
  60. /// 是否是模拟数据
  61. /// </summary>
  62. public bool isMock { get; set; }
  63. public long postId { get; set; }
  64. public long authorId { get; set; }
  65. public int categoryType { get; set; }
  66. public bool isAuthor { get; set; }
  67. /// <summary>
  68. /// 阅读时,当前用户是否是粉丝
  69. /// </summary>
  70. public bool isFan { get; set; }
  71. /// <summary>
  72. /// 当前阅读的用户编号,未登录则为0
  73. /// </summary>
  74. public long userId { get; set; }
  75. public string ip { get; set; }
  76. /// <summary>
  77. /// 用户客户端的编号,如果是H5,则为生成的GUID
  78. /// </summary>
  79. public string clientId { get; set; }
  80. public string createAt { get; set; }
  81. }
  82. }