package com.liangjian.dataplatform.member.entity.po.elasticsearch;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import javax.persistence.*;
import java.util.Date;

/**
 * @Author: 黄子奇
 * @Date: 2019/11/15
 */
@Document(indexName = "mem_user_point_log",type = "_doc")
@ApiModel("积分记录,ES文档")
public class UserPointLog {
    @Id
    @GeneratedValue(generator = "metaRelGenerator")
    @GenericGenerator(name = "metaRelGenerator", strategy = "com.liangjian.dataplatform.member.entity.genernator.SnowflakeGenernator")
    @ApiModelProperty("序号，唯一标识")
    private String id;

    @ApiModelProperty("创建日期")
    private Date crtDate;

    @ApiModelProperty("更新日期")
    private Date lastUpdate;

    @ApiModelProperty("创建用户")
    private String crtUser;

    //与用户关联的key
    @ApiModelProperty("手机密文")
    private String secretPhone;

    @ApiModelProperty("改动数值")
    private Integer value;

    @ApiModelProperty("true：增加，false：减少")
    private Boolean increase;

    @ApiModelProperty("原数值")
    private Integer origin;

    @ApiModelProperty("改动后数值")
    private Integer balance;

    @ApiModelProperty("终端平台数据编号")
    @Field(type = FieldType.Keyword)
    private String dataCode;

    @ApiModelProperty("终端编码")
    @Field(type = FieldType.Keyword)
    private String terminalCode;

    @ApiModelProperty("终端名称")
    @Field(type = FieldType.Keyword)
    private String terminalName;

    @ApiModelProperty("终端行为")
    @Field(type = FieldType.Keyword)
    private String terminalAction;

    @ApiModelProperty("用户行为")
    @Field(type = FieldType.Keyword)
    private String action;

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

    //订单金额
    @ApiModelProperty("订单金额")
    private Double orderAmount;

    //优惠金额
    @ApiModelProperty("优惠金额")
    private Double discountedPrice;

    //物流运费
    @ApiModelProperty("物流运费")
    private Double transportCost;

    //实付金额
    @ApiModelProperty("实付金额")
    private Double payment;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Date getCrtDate() {
        return crtDate;
    }

    public void setCrtDate(Date crtDate) {
        this.crtDate = crtDate;
    }

    public Date getLastUpdate() {
        return lastUpdate;
    }

    public void setLastUpdate(Date lastUpdate) {
        this.lastUpdate = lastUpdate;
    }

    public String getCrtUser() {
        return crtUser;
    }

    public void setCrtUser(String crtUser) {
        this.crtUser = crtUser;
    }

    public String getSecretPhone() {
        return secretPhone;
    }

    public void setSecretPhone(String secretPhone) {
        this.secretPhone = secretPhone;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public boolean isIncrease() {
        return increase;
    }

    public void setIncrease(boolean increase) {
        this.increase = increase;
    }

    public Integer getOrigin() {
        return origin;
    }

    public void setOrigin(Integer origin) {
        this.origin = origin;
    }

    public Integer getBalance() {
        return balance;
    }

    public void setBalance(Integer balance) {
        this.balance = balance;
    }

    public String getDataCode() {
        return dataCode;
    }

    public void setDataCode(String dataCode) {
        this.dataCode = dataCode;
    }

    public String getTerminalCode() {
        return terminalCode;
    }

    public void setTerminalCode(String terminalCode) {
        this.terminalCode = terminalCode;
    }

    public String getTerminalName() {
        return terminalName;
    }

    public void setTerminalName(String terminalName) {
        this.terminalName = terminalName;
    }

    public String getTerminalAction() {
        return terminalAction;
    }

    public void setTerminalAction(String terminalAction) {
        this.terminalAction = terminalAction;
    }

    public String getAction() {
        return action;
    }

    public void setAction(String action) {
        this.action = action;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Double getOrderAmount() {
        return orderAmount;
    }

    public void setOrderAmount(Double orderAmount) {
        this.orderAmount = orderAmount;
    }

    public Double getDiscountedPrice() {
        return discountedPrice;
    }

    public void setDiscountedPrice(Double discountedPrice) {
        this.discountedPrice = discountedPrice;
    }

    public Double getTransportCost() {
        return transportCost;
    }

    public void setTransportCost(Double transportCost) {
        this.transportCost = transportCost;
    }

    public Double getPayment() {
        return payment;
    }

    public void setPayment(Double payment) {
        this.payment = payment;
    }
}