package com.qmth.paper.library.common.bean.params;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.paper.library.common.annotation.DBVerify;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

public class BasicFileTypeParams implements Serializable {

    private static final long serialVersionUID = 1L;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "文件类型id（编辑时必填）")
    @DBVerify(value = "文件类型id（编辑时必填）")
    private Long id;

    @ApiModelProperty(value = "文件类型名称")
    @NotNull(message = "请输入文件类型名称")
    @Length(min = 1, message = "请输入文件类型名称")
    @DBVerify(value = "文件类型名称", required = true, min = 1, max = 50)
    private String name;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
