using System;
using System.Collections.Generic;
using System.Text;

namespace JiaZhiQuan.Common.ElasticSearch.Models
{
    /*
DELETE /postreadrecord

PUT /postreadrecord
{
  "mappings": {
    "properties": {
      "notValidRecord": {
        "type": "boolean"
      },
      "isMock": {
        "type": "boolean"
      },
      "postId": {
        "type": "long"
      },
      "authorId": {
        "type": "long"
      },
      "categoryType": {
        "type": "integer"
      },
      "isAuthor": {
        "type": "boolean"
      },
      "isFan": {
        "type": "boolean"
      },
      "userId": {
        "type": "long"
      },
      "ip": {
        "type": "keyword"
      },
      "clientId": {
        "type": "keyword"
      },
      "createAt": {
        "type": "date",
        "format": "yyyy-MM-dd HH:mm:ss"
      }
    }
  }
}
    */
    /// <summary>
    /// 有效的阅读记录
    /// </summary>
    public class ESPostReadRecordModel
    {
        /// <summary>
        /// 是否不是有效阅读
        /// </summary>
        public bool notValidRecord { get; set; }
        /// <summary>
        /// 是否是模拟数据
        /// </summary>
        public bool isMock { get; set; }
        public long postId { get; set; }
        public long authorId { get; set; }
        public int categoryType { get; set; }
        public bool isAuthor { get; set; }
        /// <summary>
        /// 阅读时，当前用户是否是粉丝
        /// </summary>
        public bool isFan { get; set; }
        /// <summary>
        /// 当前阅读的用户编号，未登录则为0
        /// </summary>
        public long userId { get; set; }
        public string ip { get; set; }
        /// <summary>
        /// 用户客户端的编号，如果是H5，则为生成的GUID
        /// </summary>
        public string clientId { get; set; }
        public string createAt { get; set; }
    }
}
