package com.ai.da.model.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

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

@Data
@ApiModel("AccountAddDTO")
@NoArgsConstructor
@AllArgsConstructor
public class AccountAddDTO {

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

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

    private String country;

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

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

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

    @ApiModelProperty("分配积分")
    private BigDecimal credits;

    @ApiModelProperty("用户角色")
    private Integer systemUser;

    @ApiModelProperty("学校名称 | 企业名称")
    private String organizationName;

    @ApiModelProperty("可分配子账号总数（仅适用于学校或教育管理员）")
    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;
    }
}
