package com.bohuikeji.delivery.backstage.entity;

import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.bohuikeji.frame.module.admin.annotation.TableKeyField;
import com.bohuikeji.frame.module.admin.annotation.TableNewField;
import com.bohuikeji.frame.module.admin.annotation.TableQueryField;
import com.bohuikeji.frame.module.admin.annotation.TableShowField;
import com.bohuikeji.frame.module.admin.base.EntityBase;
import com.bohuikeji.frame.module.admin.entity.vo.AddressVo;
import com.bohuikeji.frame.module.admin.enums.ColumnTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 欠费订单表
 * </p>
 *
 * @author sjh
 * @since 2022-03-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="TOrderArrears对象", description="欠费订单表")
public class TOrderArrears extends EntityBase<TOrderArrears> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @TableShowField(value = "ID",id = true)
    @TableNewField(show = false)
    private Integer id;

    @ApiModelProperty(value = "创建时间")
    @TableField("gmt_create")
    @TableShowField(value = "创建时间",show = false)
    @TableNewField(edit = false)
    @TableQueryField(like = false)
    private LocalDateTime gmtCreate;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "gmt_modified")
    @TableShowField(value = "更新时间",show = false)
    @TableNewField(edit = false)
    private LocalDateTime gmtModified;

    @ApiModelProperty(value = "订单号")
    @TableField("order_num")
    @TableShowField("订单号")
    @TableNewField(edit = false)
    @TableQueryField(show = false)
    private String orderNum;

    @ApiModelProperty(value = "第三方单号")
    @TableField("third_num")
    @TableShowField("第三方单号")
    @TableNewField(edit = false)
    @TableQueryField(show = false)
    private String thirdNum;

    @ApiModelProperty(value = "下单用户")
    @TableField("player_user")
    @TableShowField("下单用户")
    @TableNewField(edit = false)
    @TableQueryField(like = false)
    @TableKeyField(table = "t_customer",keyShowFields = {"customer_name"},key = TCustomer.class)
    private Integer playerUser;

    @ApiModelProperty(value = "下单人电话")
    @TableField("player_phone")
    @TableShowField("下单人电话")
    @TableNewField(edit = false)
    @TableQueryField(like = false)
    @TableKeyField(table = "t_customer",keyShowFields = {"customer_phone"},key =TCustomer.class)
    private Integer playerPhone;

    @ApiModelProperty(value = "寄件人姓名")
    @TableField("sender_name")
    @TableShowField("寄件人姓名")
    @TableNewField(edit = false)
    @TableQueryField(show = false)
    private String senderName;

    @ApiModelProperty(value = "寄件地址")
    @TableField("sender_address")
    @TableShowField("寄件地址")
    @TableNewField(edit = false)
    private AddressVo senderAddress;

    @ApiModelProperty(value = "寄件人手机")
    @TableField("sender_mobile")
    @TableShowField("寄件人手机")
    @TableNewField(edit = false)
    @TableQueryField(show = false)
    private String senderMobile;

    @ApiModelProperty(value = "确认取件时间")
    @TableField("pick_time")
    @TableShowField("确认取件时间")
    @TableNewField(edit = false)
    private LocalDateTime pickTime;

    @ApiModelProperty(value = "收件人姓名")
    @TableField("receive_name")
    @TableShowField("收件人姓名")
    @TableNewField(edit = false)
    @TableQueryField(show = false)
    private String receiveName;

    @ApiModelProperty(value = "收件地址")
    @TableField("receive_address")
    @TableShowField("收件地址")
    @TableNewField(edit = false)
    private AddressVo receiveAddress;

    @ApiModelProperty(value = "收件人手机")
    @TableField("receive_mobile")
    @TableShowField("收件人手机")
    @TableNewField(edit = false)
    @TableQueryField(show = false)
    private String receiveMobile;

    @ApiModelProperty(value = "下单金额")
    @TableField("create_price")
    @TableShowField("下单金额(￥)")
    @TableNewField(edit = false)
    private BigDecimal createPrice;

    @ApiModelProperty(value = "已支付金额(￥)")
    @TableField("paid_price")
    @TableShowField("已支付金额(￥)")
    @TableNewField(edit = false)
    private BigDecimal paidPrice;

    @ApiModelProperty(value = "第三方核对金额(￥)")
    @TableField("third_price")
    @TableShowField("第三方核对金额(￥)")
    @TableNewField(edit = false)
    private BigDecimal thirdPrice;

    @ApiModelProperty(value = "欠费金额(￥)")
    @TableField("arrears_price")
    @TableShowField("欠费金额(￥)")
    @TableNewField(edit = false)
    private BigDecimal arrearsPrice;

    @ApiModelProperty(value = "补付链接")
    @TableField("pay_url")
    @TableShowField(value = "补付链接",type = ColumnTypeEnum.LINK)
    @TableNewField(edit = false)
    private String payUrl;

    @ApiModelProperty(value = "订单状态")
    @TableField("order_status")
    @TableShowField("订单状态")
    @TableNewField(edit = false)
    @TableQueryField(like = false)
    @TableKeyField(table = "t_order",keyShowFields = {"order_status"},key = TOrder.class)
    private Integer orderStatus;

    /*@ApiModelProperty(value = "第三方订单状态")
    @TableField("third_status")
    @TableShowField("第三方订单状态")
    @TableNewField(edit = false)
    @TableQueryField(like = false)
    private String thirdStatus;*/

    @ApiModelProperty(value = "欠费状态")
    @TableField("arrears_status")
    @TableShowField("欠费状态")
    @TableNewField(edit = false)
    private String arrearsStatus;

    @ApiModelProperty(value = "催缴记录")
    @TableField("call_record")
    @TableShowField(value = "催缴记录",show = false)
    private JSONArray callRecord;


}
