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

import com.baomidou.mybatisplus.annotation.IdType;
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;

/**
 * <p>
 * 维保记录图片
 * </p>
 *
 * @author wcz
 * @since 2020-01-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class MtRecordImg implements Serializable {

    private static final long serialVersionUID = 1L;

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

    /**
     * 图片地址
     */
    @NotEmpty(message = "图片地址不能为空")
    private String imgUrl;

    /**
     * 排序
     */
    private Integer sort;
}
