package com.gameplatform.server.model.dto.link;

import io.swagger.v3.oas.annotations.media.Schema;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Schema(description = "选区请求")
public class SelectRegionRequest {
    
    @NotBlank(message = "code不能为空")
    @Schema(description = "链接编码", example = "66L8NM3L")
    private String code;
    
    @NotBlank(message = "region不能为空")
    @Pattern(regexp = "^[QV]$", message = "region只能是Q或V")
    @Schema(description = "选择的区域", example = "Q", allowableValues = {"Q", "V"})
    private String region;
    
    public SelectRegionRequest() {}
    
    public SelectRegionRequest(String code, String region) {
        this.code = code;
        this.region = region;
    }
    
    public String getCode() {
        return code;
    }
    
    public void setCode(String code) {
        this.code = code;
    }
    
    public String getRegion() {
        return region;
    }
    
    public void setRegion(String region) {
        this.region = region;
    }
    
    @Override
    public String toString() {
        return "SelectRegionRequest{" +
                "code='" + code + '\'' +
                ", region='" + region + '\'' +
                '}';
    }
}
