package cn.pluss.platform.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
public class PhoneValidateCode {

    @TableId
    private Integer id;
    private String phone;
    private String code;
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date sendDt;

    /**
     * 状态
     */
    private String status;

    /**
     * 试错次数
     */
    private Integer attempt;
    private String remark;

    /**
     * forget 忘记密码
     */
    @TableField(exist = false)
    private String type;

    /**
     * 有效时间
     */
    @JsonIgnore
    @JSONField(serialize = false)
    @TableField(exist = false)
    private Long limitTime;
}

