package cn.qinys.platform.upms.api.req;

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

import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * TenantCreateReq
 *
 * @author tanlie
 * @date 2024-05-21
 */
@Data
public class TenantCreateReq implements Serializable {

    /**
     * 租户名称
     */
    @NotNull(message = "名称不能为空")
    private String name;

    /**
     * 默认用户名
     */
    @Length(min = 6, max = 30, message = "用户名长度应为6-30位数")
    @Pattern(regexp = "^[a-zA-Z0-9_]+$", message = "用户名只能包含字母和下划线_")
    @NotNull(message = "服务名称不能为空")
    private String defaultUsername;
    /**
     * 备注
     */
    private String remark;
}