package com.example.module.admin.req;

import com.example.frame.base.BaseUpdateRequest;

import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;
import xyz.wbsite.wsqlite.anonation.TableField;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

/**
 * MappingUpdateRequest - 映射更新
 *
 * @author author
 * @version 0.0.1
 * @since 2019-09-28
 */
public class MappingUpdateRequest extends BaseUpdateRequest {

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

    @NotNull(message = "服务Id不能为空")
    private Long serviceId;

    @NotNull(message = "映射名称不能为空")
    private String name;

    @NotNull(message = "映射路径不能为空")
    @Pattern(regexp = "^/[a-zA-Z][a-zA-Z0-9_-]*$|^[A-Z]:/.*$|^/$", message = "映射路径须是(/)或(/+字母+字母数字及_")
    private String context;

    @NotNull(message = "映射类型不能为空")
    private String type;

    @NotNull(message = "映射地址不能为空")
    private String location;

    private String bz;

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

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

    public String getContext() {
        return context;
    }

    public void setContext(String context) {
        this.context = context;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getBz() {
        return bz;
    }

    public void setBz(String bz) {
        this.bz = bz;
    }

    public Long getId() {
        return id;
    }

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

    public Long getServiceId() {
        return serviceId;
    }

    public void setServiceId(Long serviceId) {
        this.serviceId = serviceId;
    }
}
