package com.yuchen.saas.park.api.vo.property;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.thinkunion.park.service.common.utils.AmtUtil;
import com.yuchen.saas.park.api.enums.property.DepositStatusEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

@Data
public class PropertyDepositListVo {

    private Long id;
    /**
     * 园区Id
     */
    private Long parkId;
    /**
     * 园区名称
     */
    private String parkName;

    @JsonIgnore
    private Long customerId;
    /**
     * 客户名称
     */
    private String customerName;
    /**
     * 客户类别
     */
    private String customerTypeName;
    /**
     * 房源名称
     */
    private String houseName;

    /**
     * 费用项目
     */
    private String feeItemName;

    @JsonIgnore
    private Long feeId;
    /**
     * 押金名称
     */
    private String feeName;

    @JsonIgnore
    private long depositAmtFen;
    /**
     * 押金金额; 单位：元
     */
//    private BigDecimal depositAmt;
    @ApiModelProperty(name = "depositAmt")
    public BigDecimal getDepositAmt() {
        return AmtUtil.fenToYuan(this.depositAmtFen);
    }

    private int depositStatus;
    /**
     * 押金状态
     */
    public String getDepositStatusName() {
        return DepositStatusEnum.convert(this.depositStatus).getDesc();
    }

    /**
     * 应收日期
     */
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    private Date receivableDate;
    /**
     * 收费开始日期
     */
    private Date startDate;
    /**
     * 收费结束日期
     */
    private Date endDate;
    /**
     * 付款日期
     */
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;
    /**
     * 付款类型 TODO tucq
     */
    private String paymentType;
    /**
     * 付款方式 TODO tucq
     */
    private String paymentMethod;
    /**
     * 退款时间
     */
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date refundTime;

    @JsonIgnore
    private Long createUser;
    /**
     * 备注
     */
    private String remark;
    /**
     * 创建人员
     */
    private String createUserName;
    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;


}
