package com.gree.mall.manager.bean.es;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gree.mall.manager.plus.entity.SettlementOrder;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author qinrongjun
 * @description
 * @date 2023/6/19 10:39 星期一
 */
@Data
@Document(indexName = "settlement_order")
public class SettlementOrderEs  {

    @Id
    @Field(value = "settlement_order_id",  type = FieldType.Keyword)
    private String settlementOrderId;

    @ApiModelProperty(value = "商户编号")
    @Field(value = "company_wechat_id", type = FieldType.Keyword)
    private String companyWechatId;

    @ApiModelProperty(value = "商户名称")
    @Field(value = "company_wechat_name", type = FieldType.Keyword)
    private String companyWechatName;

    @ApiModelProperty(value = "网点编号")
    @Field(value = "websit_id", type = FieldType.Keyword)
    private String websitId;

    @ApiModelProperty(value = "网点名称")
    @Field(value = "websit_name", type = FieldType.Keyword)
    private String websitName;

    @ApiModelProperty(value = "品牌")
    @Field(value = "brand", type = FieldType.Keyword)
    private String brand;

    @ApiModelProperty(value = "客户电话")
    @Field(value = "user_name", type = FieldType.Keyword)
    private String userName;

    @ApiModelProperty(value = "客户名称")
    @Field(value = "user_mobile", type = FieldType.Keyword)
    private String userMobile;

    @ApiModelProperty(value = "工程师编号")
    @Field(value = "worker_id", type = FieldType.Keyword)
    private String workerId;

    @ApiModelProperty(value = "工程师名称")
    @Field(value = "worker_name", type = FieldType.Keyword)
    private String workerName;

    @ApiModelProperty(value = "工程师手机号")
    @Field(value = "worker_mobile", type = FieldType.Keyword)
    private String workerMobile;

    @ApiModelProperty(value = "身份证")
    @Field(value = "identity", type = FieldType.Keyword)
    private String identity;

    @ApiModelProperty(value = "订单金额")
    @Field(value = "total_amount", type = FieldType.Keyword)
    private BigDecimal totalAmount;

    @ApiModelProperty(value = "销售类型  OWN 自有 OUT 外购")
    @Field(value = "settlement_type", type = FieldType.Keyword)
    private String settlementType;

    @ApiModelProperty(value = "创建人")
    @Field(value = "create_by", type = FieldType.Keyword)
    private String createBy;

    @ApiModelProperty(value = "创建时间")
    @Field(value = "create_time", type = FieldType.Date,format = DateFormat.custom, pattern ="yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "更新人")
    @Field(value = "update_by", type = FieldType.Keyword)
    private String updateBy;

    @ApiModelProperty(value = "更新时间")
    @Field(value = "update_time", type = FieldType.Date,format = DateFormat.custom, pattern ="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @ApiModelProperty(value = "支付状态")
    @Field(value = "pay_status", type = FieldType.Keyword)
    private String payStatus;

    @ApiModelProperty(value = "支付单号")
    @Field(value = "order_id", type = FieldType.Keyword)
    private String orderId;

    @ApiModelProperty(value = "支付时间")
    @Field(value = "pay_time", type = FieldType.Date,format = DateFormat.custom, pattern ="yyyy-MM-dd HH:mm:ss")
    private Date payTime;

    @ApiModelProperty(value = "结算状态: WAIT = 待结算 OK完成 YC 异常结算   LINE=线下结算")
    @Field(value = "status", type = FieldType.Keyword)
    private String status;

    @ApiModelProperty(value = "分账金额")
    @Field(value = "amount", type = FieldType.Keyword)
    private BigDecimal amount;

    @ApiModelProperty(value = "手续费")
    @Field(value = "commission_amount", type = FieldType.Keyword)
    private BigDecimal commissionAmount;

    @ApiModelProperty(value = "师傅分账金额（除去手续费）")
    @Field(value = "worker_amount", type = FieldType.Keyword)
    private BigDecimal workerAmount;

    @ApiModelProperty(value = "网点分账金额（除去手续费）")
    @Field(value = "websit_amount", type = FieldType.Keyword)
    private BigDecimal websitAmount;

    @ApiModelProperty(value = "分账时间")
    @Field(value = "settlement_time", type = FieldType.Date,format = DateFormat.custom, pattern ="yyyy-MM-dd HH:mm:ss")
    private Date settlementTime;

    @ApiModelProperty(value = "微信流水号")
    @Field(value = "wechat_order", type = FieldType.Keyword)
    private String wechatOrder;

    @ApiModelProperty(value = "商品类型 M=辅材 P=配件")
    @Field(value = "goods_type", type = FieldType.Keyword)
    private String goodsType;

    @ApiModelProperty(value = "变为提现的时间")
    @Field(value = "change_time", type = FieldType.Date,format = DateFormat.custom, pattern ="yyyy-MM-dd HH:mm:ss")
    private Date changeTime;

    @ApiModelProperty(value = "是否退款 YES 是 NO否")
    @Field(value = "refund_status", type = FieldType.Keyword)
    private String refundStatus;

    @ApiModelProperty(value = "师傅分账金额手续费")
    @Field(value = "worker_proce_amount", type = FieldType.Keyword)
    private BigDecimal workerProceAmount;

    @ApiModelProperty(value = "网点分账金额手续费")
    @Field(value = "websit_proce_amount", type = FieldType.Keyword)
    private BigDecimal websitProceAmount;

    @ApiModelProperty(value = "产品数量")
    @Field(value = "num", type = FieldType.Keyword)
    private BigDecimal num;

    @ApiModelProperty(value = "备注")
    @Field(value = "remark", type = FieldType.Keyword)
    private String remark;

    @ApiModelProperty(value = "产品大类id")
    @Field(value = "category_id", type = FieldType.Keyword)
    private String categoryId;

    @ApiModelProperty(value = "产品大类名称")
    @Field(value = "category_name", type = FieldType.Keyword)
    private String categoryName;

    @ApiModelProperty(value = "工单单号")
    @Field(value = "worker_order_id", type = FieldType.Keyword)
    private String workerOrderId;

    @ApiModelProperty(value = "WECHAT 微信支付  LINE 线下支付")
    @Field(value = "pay_type", type = FieldType.Keyword)
    private String payType;

    @ApiModelProperty(value = "销售类型 1=零售 2=工程 3=延保 4=工程维保")
    @Field(value = "sale_type", type = FieldType.Keyword)
    private Integer saleType;

    @Field(value = "settlement_order", type = FieldType.Keyword)
    private String settlementOrder;

    @ApiModelProperty(value = "微信的openid(小程序用户标识)")
    @Field(value = "open_id", type = FieldType.Keyword)
    private String openId;

    @ApiModelProperty(value = "微信流水号")
    @Field(value = "transcation_id", type = FieldType.Keyword)
    private String transcationId;

    @ApiModelProperty(value = "appid")
    @Field(value = "app_id", type = FieldType.Keyword)
    private String appId;

    @ApiModelProperty(value = "配置id")
    @Field(value = "config_id", type = FieldType.Keyword)
    private String configId;

    @ApiModelProperty(value = "异常原因")
    @Field(value = "yc_remark", type = FieldType.Keyword)
    private String ycRemark;

    @ApiModelProperty(value = "结算人")
    @Field(value = "settlement_name", type = FieldType.Keyword)
    private String settlementName;

    @ApiModelProperty(value = "服务费")
    @Field(value = "service_price", type = FieldType.Keyword)
    private BigDecimal servicePrice;

    @ApiModelProperty(value = "其他费用")
    @Field(value = "other_price", type = FieldType.Keyword)
    private BigDecimal otherPrice;

    @ApiModelProperty(value = "用户id")
    @Field(value = "user_id", type = FieldType.Keyword)
    private String userId;

    @ApiModelProperty(value = "师傅编号")
    @Field(value = "worker_number", type = FieldType.Keyword)
    private String workerNumber;

}