package com.sy.coinage.sys.req;

import com.sy.coinage.core.interceptor.Update;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.NotBlank;

import org.hibernate.validator.constraints.Length;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;

import org.hibernate.validator.constraints.Range;
import lombok.Data;

/**
 * 租户添加请求bean
 */
@Data
public class TenantReq implements Serializable {

    private static final long serialVersionUID = 1L;

    @NotNull(message = "主键id不能为空", groups = {Update.class})
    @Range(min = 1, groups = {Update.class})
    private Integer id;

    @ApiModelProperty(value = "租户名称", required = true)
    @NotBlank(message = "租户名称不能为空")
    @Length(max = 50, message = "租户名称长度50不正确")
    private String name;

    @ApiModelProperty(value = "备注", required = true)
    @Length(max = 100, message = "备注长度100不正确")
    private String remark;

    @ApiModelProperty(value = "自定义编号")
    @Length(max = 32, message = "自定义编号长度不正确,最大长度32字符")
    private String code;

}
