namespace JiaZhiQuan.Common.ElasticSearch.Models
{
    /*
     PUT / mall_goods
{
    "mappings": {
        "properties": {
            "goodsId": {
                "type": "long"
            },
            "goodsName": {
                "type": "text",
                "analyzer": "ik_max_word"
            },
            "goodsDesc": {
                "type": "text",
                "analyzer": "ik_max_word"
            },
            "parentCatId": {
                "type": "integer"
            },
            "parentCatName": {
                "type": "text",
                "analyzer": "ik_smart"
            },
            "catId": {
                "type": "integer"
            },
            "catName": {
                "type": "text",
                "analyzer": "ik_smart"
            },
            "chainCodes": {
                "type": "keyword"
            },
            "specPath": {
                "type": "text",
                "analyzer": "ik_smart",
                "fields": {
                    "keyword": {
                        "type": "keyword",
                        "ignore_above": 256
                    }
                }
            },
            "specIds": {
                "type": "integer"
            },
            "specNames": {
                "type": "text",
                "analyzer": "ik_smart",
                "fields": {
                    "keyword": {
                        "type": "keyword",
                        "ignore_above": 256
                    }
                }
            },
            "specValuesIds": {
                "type": "integer"
            },
            "specValuesNames": {
                "type": "text",
                "analyzer": "ik_smart",
                "fields": {
                    "keyword": {
                        "type": "keyword",
                        "ignore_above": 256
                    }
                }
            },
            "specJson": {
                "type": "keyword"
            },
            "goodsLevel": {
                "type": "integer"
            },
            "sellerId": {
                "type": "long"
            },
            "sellerName": {
                "type": "text",
                "analyzer": "ik_smart"
            },
            "coverImg": {
                "type": "keyword",
                "index": false
            },
            "coverWidth": {
                "type": "integer",
                "index": false
            },
            "coverHeight": {
                "type": "integer",
                "index": false
            },
            "hasVideo": {
                "type": "boolean",
                "index": false
            },
            "videoId": {
                "type": "keyword",
                "index": false
            },
            "videoReady": {
                "type": "boolean",
                "index": false
            },
            "duration": {
                "type": "keyword",
                "index": false
            },
            "originalPrice": {
                "type": "integer"
            },
            "salePrice": {
                "type": "integer"
            },
            "stock": {
                "type": "integer"
            },
            "sourceType": {
                "type": "short",
                "index": false
            },
            "disabled": {
                "type": "boolean"
            },
            "disabledReason": {
                "type": "keyword",
                 "index": false
            },
            "auditState": {
                "type": "short",
                "index": false
            },
            "onsaleState": {
                "type": "short"
            },
            "offsaleReasonType": {
                "type": "short",
                "index": false
            },
            "version": {
                "type": "integer",
                "index": false
            },
            "createAt": {
                "type": "date",
                "format": "yyyy-MM-dd HH:mm:ss"
            },
            "updateAt": {
                "type": "date",
                "format": "yyyy-MM-dd HH:mm:ss"
            },
            "saleState": {
                "type": "short"
            },
            "viewCnt": {
                "type": "integer",
                "index": false
            },
            "collectCnt": {
                "type": "integer",
                "index": false
            },
            "shareCnt": {
                "type": "integer",
                "index": false
            },
            "province": {
                "type": "text",
                "analyzer": "ik_smart"
            },
            "city": {
                "type": "text",
                "analyzer": "ik_smart"
            }
        }
    }
}
     */
    public class ESMallGoods
    {
        /// <summary>
        /// 商品id
        /// </summary>
        [ESId("_id")]
        public long goodsId { get; set; }
        /// <summary>
        /// 商品名称
        /// </summary>
        public string goodsName { get; set; }
        /// <summary>
        /// 商品描述
        /// </summary>
        public string goodsDesc { get; set; }
        /// <summary>
        /// 类目父类别编码，父类别为0，表示根节点
        /// </summary>
        public int parentCatId { get; set; }
        /// <summary>
        /// 父级类目名称
        /// </summary>

        public string parentCatName { get; set; }
        /// <summary>
        /// 类目id（最底层的类目）
        /// </summary>
        public int catId { get; set; }
        /// <summary>
        /// 类目名称
        /// </summary>
        public string catName { get; set; }
        /// <summary>
        /// 链路code
        /// </summary>
        public string chainCodes { get; set; }
        /// <summary>
        /// 属性全链路
        /// </summary>
        public string[] specPath { get; set; }
        /// <summary>
        /// 属性id，多个用,分割，前后都需加,
        /// </summary>
        public int[] specIds { get; set; }
        /// <summary>
        /// 属性名称
        /// </summary>
        public string[] specNames { get; set; }
        /// <summary>
        /// 属性值id，多个用,分割，前后都需加,
        /// </summary>
        public int[] specValuesIds { get; set; }
        /// <summary>
        /// 属性值名称
        /// </summary>
        public string[] specValuesNames { get; set; }
        /// <summary>
        /// 完整的属性信息
        /// </summary>
        public string specJson { get; set; }
        /// <summary>
        /// 商品等级
        /// </summary>
        public int? goodsLevel { get; set; }
        /// <summary>
        /// 卖家id
        /// </summary>
        public long sellerId { get; set; }
        /// <summary>
        /// 卖家名称
        /// </summary>
        public string sellerAlias { get; set; }
        /// <summary>
        /// 主图
        /// </summary>
        public string coverImg { get; set; }
        /// <summary>
        /// 主图宽
        /// </summary>
        public int coverWidth { get; set; }
        /// <summary>
        /// 主图高
        /// </summary>
        public int coverHeight { get; set; }
        /// <summary>
        /// 是否视频
        /// </summary>
        public bool hasVideo { get; set; }
        /// <summary>
        /// 视频编号
        /// </summary>
        public string videoId { get; set; }
        /// <summary>
        /// 视频是否可用，默认为false
        /// </summary>
        public bool videoReady { get; set; }
        /// <summary>
        /// 视频时长
        /// </summary>
        public string duration { get; set; }
        /// <summary>
        /// 原价
        /// </summary>
        public int originalPrice { get; set; }
        /// <summary>
        /// 销售价格
        /// </summary>
        public int salePrice { get; set; }
        /// <summary>
        /// 库存
        /// </summary>
        public int stock { get; set; }
        /// <summary>
        /// 商品来源（1，c2c商品）
        /// </summary>
        public short sourceType { get; set; }
        /// <summary>
        /// 是否禁用（1:禁用，0：启用）
        /// </summary>
        public bool disabled { get; set; }
        /// <summary>
        /// 禁用原因
        /// </summary>
        public string disabledReason { get; set; }
        /// <summary>
        /// 审核状态（0:未通过1，通过）
        /// </summary>
        public short auditState { get; set; }
        /// <summary>
        /// 刊登状态（0,下架，1，上架）
        /// </summary>
        public short onsaleState { get; set; }
        /// <summary>
        /// 下架原因类型（1,主动下架，2，售出下架）
        /// </summary>
        public short offsaleReasonType { get; set; }
        /// <summary>
        /// 商品版本（默认0，每次编辑加1,-1 为存在草稿箱）
        /// </summary>
        public int version { get; set; }
        /// <summary>
        /// 创建时间-录入时间
        /// </summary>
        public string createAt { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        public string updateAt { get; set; }
        /// <summary>
        /// 销售状态（0：未售，1，已售）
        /// </summary>
        public short saleState { get; set; }
        /// <summary>
        /// 浏览数
        /// </summary>
        public int viewCnt { get; set; }
        /// <summary>
        /// 收藏数
        /// </summary>
        public int collectCnt { get; set; }
        /// <summary>
        /// 分享数
        /// </summary>
        public int shareCnt { get; set; }
        /// <summary>
        /// 省份
        /// </summary>
        public string province { get; set; }
        /// <summary>
        /// 城市
        /// </summary>
        public string city { get; set; }
    }
}
