package com.erp.tenant.dto;

import jakarta.validation.constraints.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * 创建租户请求DTO
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CreateTenantRequest {
    
    @NotBlank(message = "租户名称不能为空")
    @Size(max = 100, message = "租户名称不能超过100字符")
    private String name;
    
    @NotBlank(message = "租户编码不能为空")
    @Size(max = 50, message = "租户编码不能超过50字符")
    @Pattern(regexp = "^[a-zA-Z0-9_]+$", message = "租户编码只能包含字母、数字和下划线")
    private String code;
    
    @Size(max = 255, message = "域名不能超过255字符")
    private String domain;
    
    @NotNull(message = "套餐ID不能为空")
    private Long packageId;
    
    @NotBlank(message = "管理员邮箱不能为空")
    @Email(message = "管理员邮箱格式不正确")
    @Size(max = 255, message = "管理员邮箱不能超过255字符")
    private String adminEmail;
    
    @Size(max = 20, message = "管理员手机号不能超过20字符")
    private String adminPhone;
    
    @NotNull(message = "到期时间不能为空")
    @Future(message = "到期时间必须是未来时间")
    private LocalDateTime expireTime;
    
    @Size(max = 500, message = "备注不能超过500字符")
    private String remark;
}
