package cn.com.ty.lift.business.emergency.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * <p>
 *      急修费用单
 * </p>
 *
 * @author wcz
 * @since 2019-12-10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ErRecordCost implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId("id")
    private Long id;

    /**
     * 急修费用单id
     */
    @NotNull(message = "急修记录不能为空")
    @Range(min = 1,message = "急修记录有误")
    private Long erRecordId;

    /**
     * 费用名称
     */
    @NotEmpty(message = "费用名称不能为空")
    private String costName;

    /**
     * 应收金额
     */
    @DecimalMin(value = "1",message = "应收金额无效")
    private BigDecimal costMoney;

    /**
     * 应收日期
     */
    private LocalDate costDate;

    /**
     * 费用描述
     */
    private String costDesc;

    /**
     * 实收金额
     */
    @DecimalMin(value = "1",message = "实收金额无效")
    private BigDecimal payMoney;

    /**
     * 实收日期
     */
    private LocalDate payDate;

    /**
     * 开票金额
     */
    @DecimalMin(value = "1",message = "开票金额无效")
    private BigDecimal invoiceMoney;

    /**
     * 开票日期
     */
    private LocalDate invoiceDate;

    /**
     * 开票附件
     */
    private String invoiceEnclosure;

    /**
     * 急修收费状态
     */
    private Integer costStatus;

    /**
     * 备注
     */
    private String remark;

}
