package com.bohuikeji.delivery.backstage.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.bohuikeji.frame.module.admin.annotation.TableKeyField;
import com.bohuikeji.frame.module.admin.annotation.TableQueryField;
import com.bohuikeji.frame.module.admin.entity.TFranchiseeInformation;
import com.bohuikeji.frame.module.admin.entity.sys.SysUser;
import com.bohuikeji.frame.module.admin.entity.web.block.SelectBlock;
import com.bohuikeji.frame.module.admin.enums.ColumnTypeEnum;
import com.bohuikeji.frame.module.admin.base.EntityBase;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import com.bohuikeji.frame.module.admin.annotation.TableShowField;
import com.bohuikeji.frame.module.admin.annotation.TableNewField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 总公司对加盟商结算单
 * </p>
 *
 * @author 10552
 * @since 2019-08-22
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="TCompanyFran对象", description="总公司对加盟商结算单")
@TableName("t_company_fran")
public class TCompanyFran extends EntityBase<TCompanyFran> {

    private static final long serialVersionUID = 1L;

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

    @ApiModelProperty(value = "申请时间")
    @TableField("sett_start_time")
    @TableShowField("申请时间")
    @TableQueryField(like = false)
    @TableNewField(edit = false)
    private LocalDateTime settStartTime;

    @ApiModelProperty(value = "完成时间")
    @TableField("sett_end_time")
    @TableShowField("完成时间")
    @TableNewField(edit = false)
    private LocalDateTime settEndTime;

    @ApiModelProperty(value = "加盟商")
    @TableField("fran_id")
    @TableQueryField(like = false)
    @TableShowField(value = "加盟商")
    @TableNewField(edit = false)
    @TableKeyField(table = "t_franchisee_information",keyShowFields = {"fran_name"},key = TFranchiseeInformation.class)
    private Integer franName;

    @ApiModelProperty(value = "结算单量")
    @TableField("sett_order_num")
    @TableQueryField(show = false)
    @TableShowField("结算单量")
    @TableNewField(edit = false)
    private Integer settOrderNum;

    @ApiModelProperty(value = "订单明细")
    @TableField("sett_order_detail")
    @TableKeyField(table = "t_order",key = TOrder.class)
    @TableShowField("订单明细")
    private String[] settOrderDetail;

    @ApiModelProperty(value = "结算金额")
    @TableField("order_pay_amount")
    @TableShowField("结算金额")
    @TableQueryField(show = false)
    @TableNewField(edit = false)
    private BigDecimal orderPayAmount;

    @ApiModelProperty(value = "第三方手续费")
    @TableField("third_surplus_amount")
    @TableShowField("第三方手续费")
    @TableNewField(edit = false)
    private BigDecimal thirdSurplusAmount;

    @ApiModelProperty(value = "结算方式")
    @TableField("sett_method")
    @TableShowField("结算方式")
    @TableQueryField(like = false)
    @TableNewField(edit = false)
    private String settMethod;

    @ApiModelProperty(value = "实际到账金额")
    @TableField("current_pay_amount")
    @TableShowField("实际到账金额")
    @TableNewField(edit = false)
    private BigDecimal currentPayAmount;

    @ApiModelProperty(value = "备注")
    @TableField("remarks")
    @TableShowField("备注")
    @TableQueryField(show = false)
    @TableNewField(edit = false)
    private String remarks;

    @ApiModelProperty(value = "结算发起人")
    @TableField("sett_initiator")
    @TableQueryField(like = false)
    @TableShowField(value = "结算发起人")
    @TableNewField(block = SelectBlock.class,edit = false)
    @TableKeyField(table = "sys_user",keyShowFields = {"user_name"},key = SysUser.class)
    private Integer settInitiator;

    @ApiModelProperty(value = "结算审核人")
    @TableField("sett_auditor")
    @TableShowField("结算审核人")
    @TableKeyField(table = "sys_user",keyShowFields = {"user_name"},key = SysUser.class)
    @TableNewField(block = SelectBlock.class,edit = false)
    private Integer settAuditor;

    @ApiModelProperty(value = "收款人(识别号)")
    @TableField("sett_payee")
    @TableShowField("收款人(识别号)")
    @TableQueryField(show = false)
    @TableNewField(edit = false)
    private String settPayee;


    @ApiModelProperty(value = "流水单号")
    @TableField("flow_num")
    @TableShowField("流水单号")
    @TableQueryField(show = false)
    @TableNewField(edit = false)
    private String flowNum;


    @ApiModelProperty(value = "结算状态")
    @TableField("sett_status")
    @TableShowField(value = "结算状态")
    @TableQueryField(like = false)
    @TableNewField(edit = false)
    private String settStatus;


}
