package com.qiaoba.api.tenant.entity.dto;

import com.qiaoba.common.base.validate.AddGroup;
import com.qiaoba.common.base.validate.EditGroup;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

/**
 * 租户 dto
 *
 * @author ailanyin
 * @version 1.0
 * @since 2023/7/14 0014 上午 10:25
 */
@Getter
@Setter
public class SysTenantDto implements Serializable {

    @NotNull(message = "ID不能为空", groups = {EditGroup.class})
    private String tenantId;

    @Schema(description = "企业名称")
    @NotBlank(message = "企业名称不能为空", groups = {AddGroup.class, EditGroup.class})
    @Size(max = 30, message = "企业名称不能超过{max}个字符", groups = {AddGroup.class, EditGroup.class})
    private String companyName;

    @Schema(description = "联系人")
    @Size(max = 30, message = "联系人不能超过{max}个字符", groups = {AddGroup.class, EditGroup.class})
    private String contactName;

    @Schema(description = "联系电话")
    @Size(max = 11, message = "联系电话不能超过{max}个字符", groups = {AddGroup.class, EditGroup.class})
    private String contactPhone;

    @Schema(description = "地址")
    @Size(max = 255, message = "地址不能超过{max}个字符", groups = {AddGroup.class, EditGroup.class})
    private String address;

    @Schema(description = "企业简介")
    @Size(max = 500, message = "企业简介不能超过{max}个字符", groups = {AddGroup.class, EditGroup.class})
    private String profile;

    @Schema(description = "统一社会信用代码")
    @Size(max = 20, message = "企业简介不能超过{max}个字符", groups = {AddGroup.class, EditGroup.class})
    private String licenseNumber;

    @Schema(description = "域名")
    private String domain;

    @Schema(description = "备注")
    @Size(max = 500, message = "备注不能超过{max}个字符", groups = {AddGroup.class, EditGroup.class})
    private String remark;

    @NotNull(message = "过期时间不能为空", groups = {AddGroup.class, EditGroup.class})
    @Schema(description = "过期时间")
    private Date expireTime;

    @NotNull(message = "用户数量不能为空", groups = {AddGroup.class, EditGroup.class})
    @Schema(description = "用户数量")
    private Long accountCount;

}
