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

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.thinkunion.park.service.common.utils.AmtUtil;
import com.yuchen.saas.park.api.enums.property.PriceUnitTypeEnum;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class PropertyBillTempBillViewVo {
    /**
     * 园区id
     */
    private Long parkId;
    /**
     * 楼栋id
     */
    private Long buildingId;
    /**
     * 房源id
     */
    private Long houseId;
//    /**
//     * 客户id
//     */
//    private Long customerId;
    /**
     * 房源资源
     */
    private String resourceCode;
    /**
     * 收费标准id
     */
    private Long feeId;
    /**
     * 收费标准名称
     */
    private String feeName;

    @JsonIgnore
    private Long priceFen;
    /**
     * 价格;单位：元
     */
    private BigDecimal price;
    public BigDecimal getPrice() {
        return AmtUtil.fenToYuanObj(this.priceFen);
    }


    @JsonIgnore
    private Integer priceUnitType;

    /**
     * 计价单位
     */
    private String priceUnitTypeName;
    public String getPriceUnitTypeName() {
        if (priceUnitType != null) {
            return PriceUnitTypeEnum.convert(this.priceUnitType).getDesc();
        }
        return "";
    }

}
