package com.backendsys.entity.System;

import com.backendsys.entity.validator.RangeStringArray;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

@Data
public class SysSMSDTO {
    public static interface Send{}

    private Long id;

    @RangeStringArray(message="短信类型有误，范围应是(login：登录, register：注册, forgotPassword: 忘记密码)", value = {"login", "register", "forgotPassword"}, groups = { Send.class })
    @NotEmpty(message="短信类型不能为空", groups = { Send.class })
    private String origin;

    @NotEmpty(message="手机号码不能为空", groups = { Send.class })
    @Size(max = 50, message = "手机号码长度不超过 {max} 字符", groups = { Send.class })
    private String phone;
    @NotNull(message="区号/国家码不能为空", groups = { Send.class })
    @Max(value = 999999, message = "区号/国家码长度不超过 {value} 字符", groups = { Send.class })
    private Integer phone_area_code;
    private String sms_code;
    private String ip;
    private String ua;
    private String create_time;
}
