package com.yaoai.api.dto.onboarding;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

@Data
public class TenantOnboardingRequest {

    @NotBlank(message = "企业名称不能为空")
    @Size(max = 160, message = "企业名称不能超过 160 字符")
    private String companyName;

    @NotBlank(message = "统一社会信用代码不能为空")
    @Pattern(regexp = "^[0-9A-Z]{15,18}$", message = "统一社会信用代码需为 15-18 位大写字母或数字")
    private String creditCode;

    @NotBlank(message = "法人姓名不能为空")
    @Size(max = 80, message = "法人姓名不能超过 80 字符")
    private String legalPersonName;

    @Size(max = 80, message = "经办人姓名不能超过 80 字符")
    private String agentName;

    @NotBlank(message = "联系人不能为空")
    @Size(max = 80, message = "联系人不能超过 80 字符")
    private String contactName;

    @Pattern(regexp = "^$|^1[3-9]\\d{9}$", message = "联系电话格式不正确")
    private String contactPhone;

    @Email(message = "联系邮箱格式不正确")
    private String contactEmail;

    @NotBlank(message = "Owner 登录名不能为空")
    @Size(min = 2, max = 30, message = "Owner 登录名长度 2-30 位")
    @Pattern(regexp = "^[a-zA-Z0-9_-]+$", message = "Owner 登录名只能包含字母、数字、下划线、短横线")
    private String ownerUsername;

    @NotBlank(message = "Owner 登录邮箱不能为空")
    @Email(message = "Owner 登录邮箱格式不正确")
    private String ownerEmail;

    @NotBlank(message = "Owner 初始密码不能为空")
    @Size(min = 8, max = 50, message = "Owner 初始密码长度 8-50 位")
    private String ownerPassword;

    private String industry;

    private String companyScale;

    private String businessScope;

    private String trialPlan;
}
