package cn.com.ty.lift.business.maintenance.dao.entity;

import cn.com.ty.lift.business.common.BaseEntity;
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.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * <p>
 * 保养记录关联收费项
 * </p>
 *
 * @author wcz
 * @since 2020-01-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class MtRecordCost extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId("id")
    private Long id;

    /**
     * 维保记录id
     */
    @NotNull(message = "维保记录不能为空")
    @Range(min = 1,message = "维保记录有误")
    private Long mtRecordId;

    /**
     * 零配件名称
     */
    @NotEmpty(message = "零配件名称不能为空")
    private String sparepart;

    /**
     * 配件费
     */
    private BigDecimal partsCost;

    /**
     * 工时费
     */
    private BigDecimal manCost;
}
