package com.bohuikeji.delivery.backstage.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
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.constant.RegEx;
import com.bohuikeji.frame.module.admin.entity.TFranchiseeInformation;
import com.bohuikeji.frame.module.admin.entity.web.block.DateBlock;
import com.bohuikeji.frame.module.admin.entity.web.block.FileBlock;
import com.bohuikeji.frame.module.admin.entity.web.block.SelectBlock;
import com.bohuikeji.frame.module.admin.entity.web.block.TextBlock;
import com.bohuikeji.frame.module.admin.enums.ColumnTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>
 * 派送员退款多级审核信息表
 * </p>
 *
 * @author 10552
 * @since 2019-08-22
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="TCourierExam对象", description="派送员退款多级审核信息表")
@TableName("t_courier_exam")
public class TCourierExam extends EntityBase<TCourierExam> {

    @ApiModelProperty(value="派送员审核记录id(新增时请留空或null)")
    @TableId(value = "courier_exam_id", type = IdType.AUTO)
    @TableShowField(value = "ID",id = true)
    @TableNewField(show = false)
    private Integer courierExamId;

    @ApiModelProperty(value = "派送员id")
    @TableField("courier_id")
    @TableShowField(value = "派送员",show = false)
    @TableQueryField(show = false)
    @TableNewField(edit = false,block = SelectBlock.class,add = false,required = false,show = false)
    private Integer courierId;

    @ApiModelProperty(value = "员工编号")
    @TableField("courier_number")
    @TableQueryField(show = false)
    @TableShowField(value = "员工编号")
    @TableNewField(edit = false)
    private String courierNumber;

    @ApiModelProperty(value = "骑手姓名")
    @TableField("courier_name")
    @TableShowField(value = "骑手姓名")
    @TableNewField(limit = RegEx.INTEGER,edit = false)
    @TableQueryField(like = false)
    private String courierName;


    @ApiModelProperty(value = "配送员手机号（账号）")
    @TableField("courier_phone")
    @TableShowField(value = "配送员手机号")
    @TableNewField(limit = RegEx.INTEGER,edit = false)
    @TableQueryField(show = false)
    private String courierPhone;


    @ApiModelProperty(value = "职位类型(全职、兼职)")
    @TableField("courier_type")
    @TableQueryField
    @TableShowField(value = "职位类型")
    @TableNewField(options = {"全职","兼职"},edit = false)
    private String courierType="兼职";

    @ApiModelProperty(value = "退款金额")
    @TableField("courier_settled_money")
    @TableShowField(value = "退款金额(￥)")
    @TableNewField(limit = RegEx.INTEGER,edit = false,required = false)
    private BigDecimal courierSettledMoney;

    @ApiModelProperty(value = "支付渠道")
    @TableField("pay_channel")
    @TableQueryField(like = false)
    @TableNewField(edit = false)
    @TableShowField(value = "支付渠道")
    private String payChannel;

    @ApiModelProperty(value = "渠道商支付单号")
    @TableField("pay_channel_num")
    @TableQueryField(show = false)
    @TableNewField(edit = false)
    @TableShowField(value = "渠道商支付单号")
    private String payChannelNum;

    @ApiModelProperty(value = "系统支付单号")
    @TableField("pay_num")
    @TableQueryField(show = false)
    @TableNewField(edit = false)
    @TableShowField(value = "系统支付单号")
    private String payNum;

    @ApiModelProperty(value = "支付时间")
    @TableField("pay_time")
    @TableNewField(edit = false)
    @TableShowField(value = "支付时间")
    private String payTime;

    @ApiModelProperty(value = "缴费状态")
    @TableField("courier_pay_status")
    @TableShowField(value = "缴费状态",show = false)
    @TableNewField(block = SelectBlock.class,options = {"已缴费","已退款"},edit = false)
    @TableQueryField
    private String courierPayStatus="已缴费";

    @ApiModelProperty(value = "审核中，审核完成，审核失败")
    @TableField("exam_status")
    @TableQueryField
    @TableShowField(value = "审核状态")
    @TableNewField(block = SelectBlock.class,options = {"审核中","审核完成","审核失败"})
    private String examStatus="审核中";


    @ApiModelProperty(value = "提交时间")
    @TableField("create_time")
    @TableShowField("提交时间")
    @TableNewField(show = false,edit = false)
    @TableQueryField(like = false,sort = 0)
    private LocalDateTime createTime=LocalDateTime.now();

    @ApiModelProperty(value = "更新时间")
    @TableField("update_time")
    @TableShowField(value = "更新时间",show = false)
    @TableNewField(block = DateBlock.class,edit = false)
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "加盟商id")
    @TableField("fran_id")
    @TableShowField(value = "所属加盟商")
    @TableNewField(block = SelectBlock.class,edit = false)
    @TableQueryField
    @TableKeyField(table = "t_franchisee_information",keyShowFields = "fran_name", where = "fran_id in(##FRAN_IDS##)",key = TFranchiseeInformation.class)
    private Integer franId;


    @ApiModelProperty(value = "加盟商审核状态(待审核，已审核)")
    @TableField("fran_exam")
    @TableQueryField
    @TableShowField(value = "加盟商审核")
    @TableNewField(block = SelectBlock.class,edit = false)
    private String franExam="待审核";

    @ApiModelProperty(value = "加盟商审核人")
    @TableField("fran_audit_user")
    @TableQueryField(show = false)
    @TableShowField(value = "加盟商审核人")
    @TableNewField(edit = false)
    private String franAuditUser;


    @ApiModelProperty(value = "平台审核状态(待审核，已审核)")
    @TableField("platform_exam")
    @TableQueryField
    @TableShowField(value = "平台审核")
    @TableNewField(block = SelectBlock.class,options = {"待审核","已审核"})
    private String platformExam="待审核";

    @ApiModelProperty(value = "平台审核人")
    @TableField("platform_audit_user")
    @TableQueryField(show = false)
    @TableShowField(value = "平台审核人")
    @TableNewField(edit = false)
    private String platformAuditUser;

    @ApiModelProperty(value = "驳回说明")
    @TableField("reject_explain")
    @TableQueryField
    @TableShowField(value = "驳回说明",show = false)
    @TableNewField(block = TextBlock.class,required = false)
    private String rejectExplain;

    @ApiModelProperty(value = "缴费等级")
    @TableField("grade")
    /*@TableQueryField(show = false)
    @TableShowField(value = "个推用户个人标识")
    @TableNewField*/
    private Integer grade;

}
