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.common.SortColumn;
import com.iformall.domain.po.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author gongbiao
 */
@TableName(value = "wx_bill_daily")
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class WxBillDaily extends BaseEntity {
    protected Long id;


    @TableField(exist = false)
	private String merchantName;

	@Excel(name = "费用类型*", replace = {"水费_1", "电费_2"}, width = 20, orderNum = "2")
	@NotNull
	@io.swagger.annotations.ApiModelProperty(value="账单类型",name="type")
	private Integer type;

    @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="receivePay")
    private Long receivePay;

	@io.swagger.annotations.ApiModelProperty(value="实收金额",name="pay")
    private Long pay;

    @Excel(name = "缴款截止日期*", orderNum = "5", width = 20, format = "yyyy-MM-dd")
	@NotNull
    @io.swagger.annotations.ApiModelProperty(value="截止收款日期",name="receiveDate")
	private Date receiveDate;

    @io.swagger.annotations.ApiModelProperty(value="到账日期",name="payDate")
	private Date payDate;

	@io.swagger.annotations.ApiModelProperty(value="创建时间",name="createtime")
	private Date createtime;

    @io.swagger.annotations.ApiModelProperty(value="逾期天数",name="expiredDay")
	private Long expiredDay;
	@io.swagger.annotations.ApiModelProperty(value="租户",name="tenantId")
	private String tenantId;
	@io.swagger.annotations.ApiModelProperty(value="欠缴",name="owe")
    private Long owe;
    @io.swagger.annotations.ApiModelProperty(value = "账单状态1欠缴2待缴3已结清4未到期", name = "status")
	private Integer status;
	@io.swagger.annotations.ApiModelProperty(value="删除 是1否0",name="isDel")
	private Integer isDel;
	@io.swagger.annotations.ApiModelProperty(value="商户ID",name="merchantId")
	private Long merchantId;
	@io.swagger.annotations.ApiModelProperty(value="账号ID",name="userId")
	private Long userId;
	@io.swagger.annotations.ApiModelProperty(value="商铺ID",name="shopId")
	private Long shopId;
	@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updatetime")
	private Date updatetime;

	@Excel(name = "租赁商铺类型*", orderNum = "6", width = 20, replace = {"店铺_1", "多经点位_2"})
	@io.swagger.annotations.ApiModelProperty(value = "租赁商铺类型", name = "rentShopType")
	private Integer rentShopType;

	@io.swagger.annotations.ApiModelProperty(value = "支付方式：见枚举EnumBillPayWay", name = "payWay")
	private Integer payWay;

    @io.swagger.annotations.ApiModelProperty(value = "费用明细", name = "priceDetail")
    private String priceDetail;

	@TableField(exist = false)
	private Integer allPeriod;

	@TableField(exist = false)
	private Long needPay;

	@TableField(exist = false)
	private Long latePayPrice;

	@TableField(exist = false)
	@SortColumn(column = "period")
	private Integer period;

	@TableField(exist = false)
	private String shopNumber;

	@TableField(exist = false)
	private List<Map<String, Object>> shops;

	@io.swagger.annotations.ApiModelProperty(value = "开始时间", name = "starttime")
	private Date starttime;

	@io.swagger.annotations.ApiModelProperty(value = "结束时间", name = "endtime")
	private Date endtime;
	@io.swagger.annotations.ApiModelProperty(value = "冻结状态，0正常1冻结", name = "freeze")
	private Integer freeze;

	@io.swagger.annotations.ApiModelProperty(value = "创建方式1手动2自动3导入", name = "buildWay")
	private Integer buildWay;

	@io.swagger.annotations.ApiModelProperty(value = "手续费", name = "serviceChargePay")
	private Integer serviceChargePay;

	@io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="realReceivePay")
	@TableField(exist = false)
	private Long realReceivePay;

	@TableField(exist = false)
	private String serviceChargePayBefore;
	@TableField(exist = false)
	private String serviceChargePayUpdate;
}
