package com.erp.user.entity.auth;

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

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 短信验证码实体
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SmsCode implements Serializable {
    
    private static final long serialVersionUID = 1L;
    
    /**
     * 手机号
     */
    private String phone;
    
    /**
     * 验证码
     */
    private String code;
    
    /**
     * 场景：register, login, reset
     */
    private String scene;
    
    /**
     * 发送时间
     */
    private LocalDateTime sentAt;
    
    /**
     * 过期时间
     */
    private LocalDateTime expiresAt;
    
    /**
     * 验证次数
     */
    private Integer verifyCount;
    
    /**
     * 是否已使用
     */
    private Boolean used;
}
