package xyz.wbsite.module.admin.req;

import xyz.wbsite.frame.base.BaseUpdateRequest;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotEmpty;
import xyz.wbsite.frame.validation.Select;

/**
 * ConfigUpdateRequest - 配置预设更新
 *
 * @author wangbing
 * @version 0.0.1
 * @since 2021-02-07
 */
public class ConfigUpdateRequest extends BaseUpdateRequest {

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

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

    /**
     * 配置类型.
     * HTTP:全局配置
     * SERVER:主机配置
     * LOCATION:路径配置
     */
    @NotNull(message = "[confType]配置类型不能为NULL")
    @Select({"HTTP", "SERVER", "LOCATION"})
    private String confType;

    /**
     * 配置属值.
     */
    @Length(min = 0, max = 255, message = "[confValue]配置属值长度不合法(0-255)")
    private String confValue;

    /**
     * 配置备注.
     */
    @Length(min = 0, max = 255, message = "[confNote]配置备注长度不合法(0-255)")
    private String confNote;

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

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

    public String getConfName() {
        return this.confName;
    }

    public void setConfName(String confName) {
        this.confName = confName;
    }

    public String getConfType() {
        return this.confType;
    }

    public void setConfType(String confType) {
        this.confType = confType;
    }

    public String getConfValue() {
        return this.confValue;
    }

    public void setConfValue(String confValue) {
        this.confValue = confValue;
    }

    public String getConfNote() {
        return this.confNote;
    }

    public void setConfNote(String confNote) {
        this.confNote = confNote;
    }
}
