package com.ai.da.model.dto;

import io.swagger.v3.oas.annotations.media.Schema;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import jakarta.validation.constraints.NotBlank;
import java.math.BigDecimal;

@Data
@Schema(description = "AccountAddDTO")
@NoArgsConstructor
@AllArgsConstructor
public class AccountAddDTO {

    @NotBlank(message = "email.cannot.be.empty")
    @Schema(description = "userEmail")
    private String userEmail;

    @NotBlank(message = "userName.cannot.be.empty")
    @Schema(description = "userName")
    private String userName;

    private String country;

    @NotBlank(message = "validStartTime.cannot.be.empty")
    @Schema(description = "Start time of account validity ")
    private String validStartTime;

    @NotBlank(message = "validEndTime.cannot.be.empty")
    @Schema(description = "End time of account validity ")
    private String validEndTime;

    @Schema(description = "是否是试用用户 0 否 | 1 是")
    private Integer isTrial;

    @Schema(description = "分配积分")
    private BigDecimal credits;

    @Schema(description = "用户角色")
    private Integer systemUser;

    @Schema(description = "学校名称 | 企业名称")
    private String organizationName;

    @Schema(description = "可分配子账号总数（仅适用于学校或教育管理员）")
    private Integer subAccountNum;

    public AccountAddDTO(String userEmail, String userName, String country, String validStartTime, String validEndTime, Integer isTrial, BigDecimal credits, Integer systemUser) {
        this.userEmail = userEmail;
        this.userName = userName;
        this.country = country;
        this.validStartTime = validStartTime;
        this.validEndTime = validEndTime;
        this.isTrial = isTrial;
        this.credits = credits;
        this.systemUser = systemUser;
    }
}
