package com.iformall.domain.po;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.iformall.domain.po.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;


import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author luozukai
 */
@TableName(value = "wx_bill_settle")
@Data
@EqualsAndHashCode(callSuper = true)
public class WxBillSettle extends BaseEntity {
	private static final long serialVersionUID = 1L;


    protected Long id;


    @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId")
	private String tenantId;
	@io.swagger.annotations.ApiModelProperty(value="结算单号",name="settleNumber")
	@Excel(name="结算单号",width = 20,orderNum = "1")
	private String settleNumber;
	@TableField(exist = false)
	@Excel(name="结算商户",width = 20,orderNum = "2")
	private String merchantName;
	@io.swagger.annotations.ApiModelProperty(value="商户id",name="merchantId")
	private Long merchantId;
	@io.swagger.annotations.ApiModelProperty(value="0待确认1未清算结余金额2结算完成",name="status")
	@Excel(name="结算状态",width = 20,orderNum = "8")
	private Integer status;
	@io.swagger.annotations.ApiModelProperty(value="审核状态0未审核1审核中2审核完成3驳回4异常终止5撤回",name="applyStatus")
	@Excel(name="审批状态",width = 20,orderNum = "9")
	private Integer applyStatus;
	@Excel(name="收款(元)",width = 20,orderNum = "4")
	@io.swagger.annotations.ApiModelProperty(value="收款",name="receiveMoney")
	private Long receiveMoney;
	@io.swagger.annotations.ApiModelProperty(value="承付",name="payMoney")
	@Excel(name="承付(元)",width = 20,orderNum = "5")
	private Long payMoney;
	@io.swagger.annotations.ApiModelProperty(value="结算时间",name="settletime")
	@Excel(name="结算时间",width = 20,orderNum = "7")
	private Date settletime;

	@Excel(name="创建时间",width = 20,orderNum = "3")
	@io.swagger.annotations.ApiModelProperty(value="创建时间",name="createtime")
	private Date createtime;
	@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updatetime")
	private Date updatetime;

	@TableField(exist = false)
	@io.swagger.annotations.ApiModelProperty(value = "审批流参数", name = "flowParams")
	private Map<String, Object> flowParams;

	//结余金额
	@TableField(exist = false)
	@Excel(name="结算金额(元)",width = 20,orderNum = "6")
	private Long balance;

	@TableField(exist = false)
    @io.swagger.annotations.ApiModelProperty(value = "收款账单列表", name = "receiveBillIds")
	private List<WxBillSettleBill> receiveBillIds;
	@TableField(exist = false)
    @io.swagger.annotations.ApiModelProperty(value = "承付账单列表", name = "payBillIds")
	private List<WxBillSettleBill> payBillIds;
	@TableField(exist = false)
	@io.swagger.annotations.ApiModelProperty(value = "结单记录", name = "settleRecordList")
	private List<WxBillSettleRecord> settleRecordList;


	@TableField(exist = false)
	@io.swagger.annotations.ApiModelProperty(value = "开始时间", name = "starttime")
	private Date starttime;
	@TableField(exist = false)
	@io.swagger.annotations.ApiModelProperty(value = "结束时间", name = "endtime")
	private Date endtime;

	@TableField(exist = false)
	@io.swagger.annotations.ApiModelProperty(value="清算方向 1商场结款 2商户结款",name="settleWay")
	private Integer settleWay;

	@TableField(exist = false)
	@io.swagger.annotations.ApiModelProperty(value="流向 0流入 1流出",name="direction")
	private Integer direction;

	@TableField(exist = false)
	private Integer limitStart;
	@TableField(exist = false)
	private Integer limitEnd;


	@TableField(exist = false)
	@io.swagger.annotations.ApiModelProperty(value="是否过滤结算历史 1不过滤",name="filterSettleRecord")
	private Integer filterSettleRecord =0;
}
