ESPostShareRecordModel.cs 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace JiaZhiQuan.Common.ElasticSearch.Models
  5. {
  6. /*
  7. DELETE /postsharerecord
  8. PUT /postsharerecord
  9. {
  10. "mappings": {
  11. "properties": {
  12. "id": {
  13. "type": "keyword"
  14. },
  15. "notValidRecord": {
  16. "type": "boolean"
  17. },
  18. "isMock": {
  19. "type": "boolean"
  20. },
  21. "postId": {
  22. "type": "long"
  23. },
  24. "authorId": {
  25. "type": "long"
  26. },
  27. "categoryType": {
  28. "type": "integer"
  29. },
  30. "isAuthor": {
  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 ESPostShareRecordModel
  54. {
  55. /// <summary>
  56. /// 如果是已登录的,则为 postId_userId,其他为 guid
  57. /// 这里将记录所有分享记录,id变为guid,不再存postId_userId形式
  58. /// </summary>
  59. public string id { get; set; }
  60. /// <summary>
  61. /// 是否不是有效分享
  62. /// </summary>
  63. public bool notValidRecord { get; set; }
  64. /// <summary>
  65. /// 是否是模拟数据
  66. /// </summary>
  67. public bool isMock { get; set; }
  68. public long postId { get; set; }
  69. public long authorId { get; set; }
  70. public int categoryType { get; set; }
  71. public bool isAuthor { get; set; }
  72. /// <summary>
  73. /// 当前分享的用户编号,未登录则为0
  74. /// </summary>
  75. public long userId { get; set; }
  76. public string ip { get; set; }
  77. /// <summary>
  78. /// 用户客户端的编号,如果是H5,则为生成的GUID
  79. /// </summary>
  80. public string clientId { get; set; }
  81. public string createAt { get; set; }
  82. }
  83. }