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

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.thinkunion.park.service.common.utils.AmtUtil;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import java.math.BigDecimal;

/**
 * 经营性收费参数
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class PropertyBusinessRefundDto extends PropertyPaymentRefundAccountDto {

    @NotNull(message = "id不能为空")
    private Long id;

    /**
     * 退款金额: 元
     */
    @NotNull(message = "退款金额不能为空")
    @Positive(message = "退款金额必须大于0")
    private BigDecimal refundAmt;

    @JsonIgnore
    private Long refundAmtFen;
    public Long getRefundAmtFen() {
        return AmtUtil.yuanToFenObj(this.refundAmt);
    }

    /**
     * 退款备注
     */
    private String refundRemark;


}
