package ${basePackage}.module.system.req;

import ${basePackage}.frame.base.BaseUpdateRequest;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import ${basePackage}.frame.validation.Dict;

/**
 * ResUpdateRequest - 资源更新
 *
 * @author wangbing
 * @version 0.0.1
 * @since 2017-01-01
 */
public class ResUpdateRequest extends BaseUpdateRequest {

    /**
     * 主键
     */
    @NotNull(message = "[id]主键不能为NULL")
    private Long id;

    /**
     * 资源代码
     */
    @NotBlank(message = "[resCode]资源代码不能为空")
    @Length(min = 0, max = 50, message = "[resCode]资源代码长度不合法(0-50)")
    private String resCode;

    /**
     * 资源名称
     */
    @NotBlank(message = "[resName]资源名称不能为空")
    @Length(min = 0, max = 50, message = "[resName]资源名称长度不合法(0-50)")
    private String resName;

    /**
     * 资源类型
     */
    @NotNull(message = "[resType]资源类型不能为NULL")
    @Dict(name = "RES_TYPE")
    private String resType;

    /**
     * 资源内容
     */
    @Length(min = 0, max = 255, message = "[resValue]资源内容长度不合法(0-255)")
    private String resValue;

    /**
     * 上级代码
     */
    @Length(min = 0, max = 50, message = "[supCode]上级代码长度不合法(0-50)")
    private String supCode;

    /**
     * 上级名称
     */
    @Length(min = 0, max = 50, message = "[supName]上级名称长度不合法(0-50)")
    private String supName;

    /**
     * 是否有效
     */
    @NotNull(message = "[valid]是否有效不能为NULL")
    private Boolean valid;

    public Long getId() {
        return this.id;
    }

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

    public String getResCode() {
        return this.resCode;
    }

    public void setResCode(String resCode) {
        this.resCode = resCode;
    }

    public String getResName() {
        return this.resName;
    }

    public void setResName(String resName) {
        this.resName = resName;
    }

    public String getResType() {
        return this.resType;
    }

    public void setResType(String resType) {
        this.resType = resType;
    }

    public String getResValue() {
        return this.resValue;
    }

    public void setResValue(String resValue) {
        this.resValue = resValue;
    }

    public String getSupCode() {
        return this.supCode;
    }

    public void setSupCode(String supCode) {
        this.supCode = supCode;
    }

    public String getSupName() {
        return this.supName;
    }

    public void setSupName(String supName) {
        this.supName = supName;
    }

    public Boolean getValid() {
        return this.valid;
    }

    public void setValid(Boolean valid) {
        this.valid = valid;
    }
}

