package cn.pluss.platform.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author bzg
 * @since 2021-09-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_pluss_merchant_complaint_record")
public class MerchantComplaintRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;


    /**
     * 商户编号
     */
    @NotEmpty(message = "缺少商户编号")
    @TableField("merchantCode")
    private String merchantCode;


    @TableField("merchantName")
    private String merchantName;

    /**
     * 订单金额
     */
    @NotNull(message = "缺少订单金额")
    @TableField("orderAmt")
    private BigDecimal orderAmt;


    /**
     * 交易时间
     */
    @NotNull(message = "缺少交易时间")
    @TableField("payTime")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date payTime;

    /**
     * 交易时间 开始时间
     */
    @TableField(exist = false, condition = "payTime &gt; #{%s}")
    private Date payTimeStart;

    /**
     * 交易时间 截止时间
     */
    @TableField(exist = false, condition = "payTime &lt; #{%s}")
    private Date payTimeEnd;

    /**
     * 投诉人联系方式
     */
    @NotEmpty(message = "缺少投诉人联系方式")
    @TableField("complaintPhone")
    private String complaintPhone;


    /**
     * 投诉内容
     */
    @NotEmpty(message = "缺少投诉内容")
    @TableField("remark")
    private String remark;


    /**
     * 投诉订单号
     */
    @TableField("orderNumber")
    private String orderNumber;


    /**
     * 创建时间
     */
    @TableField(value = "createTime", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 创建时间 开始时间
     */
    @TableField(exist = false, condition = "createTime &gt; #{%s}")
    private Date createTimeStart;

    /**
     * 创建时间 截止时间
     */
    @TableField(exist = false, condition = "createTime &lt; #{%s}")
    private Date createTimeEnd;

    /**
     * 1:未处理，2：已处理
     */
    @TableField("status")
    private String status;

    @TableField(exist = false)
    private List<String> imageList;

    @TableField(exist = false)
    private UserInfo userInfo;

}