package com.backendsys.modules.material.entity;

import com.backendsys.entity.System.SysUserDTO;
import com.backendsys.entity.validator.Phone;
import jakarta.validation.constraints.*;
import lombok.Data;

@Data
public class MaterialUser {

    public static interface Register{}

    @NotEmpty(message="手机号码不能为空", groups = { Register.class })
    @Phone(message="手机号码格式不正确", groups = { Register.class })
    @Size(min = 9, max = 20, message = "手机号码长度在 {min}-{max} 字符", groups = { Register.class })
    private String phone;

    @NotNull(message="验证码不能为空", groups = { Register.class })
    @Min(value = 100000, message = "验证码长度是 6 位字符", groups = { Register.class })
    @Max(value = 999999, message = "验证码长度是 6 位字符", groups = { Register.class })
    private Integer phone_valid_code;

    @NotNull(message="区号/国家码不能为空", groups = { Register.class })
    @Max(value = 999999, message = "区号/国家码长度不超过 {value} 字符", groups = { Register.class })
    private Integer phone_area_code;
    
    
}
