package cn.ezhizao.project.business.deduct.domain;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import cn.ezhizao.project.business.statementAccount.domain.BizStatementAccount;
import cn.ezhizao.project.business.statementAccount.domain.BizStatementAccountLoop;
import cn.ezhizao.project.business.statementAccount.domain.BizStatementAccountOnce;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableName;
import cn.ezhizao.framework.web.domain.BaseEntity;
import lombok.Data;
import io.swagger.annotations.ApiModelProperty;
import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
import org.checkerframework.checker.units.qual.A;

/**
 * 扣款记录对象 biz_deduct
 *
 * @author ruoyi
 * @date 2023-11-13
 */
@Data
@TableName(value = "biz_deduct")
public class BizDeduct extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 签约主体外键 */
    @ApiModelProperty(value = "${comment}")
    private Long tenantId;

    /** 租户外键 */
    @ApiModelProperty(value = "${comment}")
    private Long fromTenantId;

    /** 委托订单外键外键 */
    @ApiModelProperty(value = "${comment}")
    private Long entrustOrderId;

    @Excel(name = "委托单号")
    @TableField(exist = false)
    private String formNo;

    @Excel(name = "扣款单位")
    @TableField(exist = false)
    private String contactCompany;

    @Excel(name = "扣款信息")
    @TableField(exist = false)
    private String contactMsg;

    /** 描述 */

    @ApiModelProperty(value = "描述")
    private String description;

    /** 扣款时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "扣款时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "扣款时间")
    private Date deductDate;

    /** 扣款金额 */
    @Excel(name = "扣款金额")
    @ApiModelProperty(value = "扣款金额")
    private BigDecimal amount;

    @ApiModelProperty("上期余额")
    private BigDecimal prevRemainAmount;

    @ApiModelProperty("本期余额")
    private BigDecimal remainAmount;

    /** 状态 0已提交 1已确认 2已扣款 4已驳回 */
    @ApiModelProperty(value = "状态 0已提交 1已确认 2已扣款 4已驳回")
    private Integer status;

    @Excel(name = "状态")
    @TableField(exist = false)
    private String statusName;

    @TableField(exist = false)
    @ApiModelProperty("签约主体")
    private String signingSubject;



    @ApiModelProperty("年")
    private String year;
    @ApiModelProperty("月")
    private String month;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "对账日期", width = 20, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("对账日期")
    private Date statementDate;


    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date currentDate;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date startMonth;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endMonth;

    @TableField(exist = false)
    private List<BizStatementAccountOnce> onceList;
    @TableField(exist = false)
    private List<BizStatementAccountLoop> loopList;

    @TableField(exist = false)
    private List<BizStatementAccount> collect;
    @TableField(exist = false)
    private Integer entrustOrderStatus;

}
