package com.zhangmeng.model.entity;

import com.zhangmeng.model.base.baseEntity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 验证码
 *
 * @author zhangmeng
 * @version 1.0
 * @date 2021/4/1 21:29
 */
@NoArgsConstructor
@Data
@AllArgsConstructor
@Entity
@EqualsAndHashCode(callSuper = false)
@Table(name = "verification_code")
public class VerificationCode extends BaseEntity<Long> {

    /**
     * 类型
     */
    public enum Type{
        /**
         * 手机
         */
        mobile("手机"),

        /**
         * 网页
         */
        pc("web");

        Type(String description) {
            this.description = description;
        }

        //描述
        private String description;

        public String getDescription() {
            return description;
        }

        public void setDescription(String description) {
            this.description = description;
        }
    }

    /**
     * 状态
     */
    public enum Status{
        /**
         * 登录
         */
        login("登录"),

        /**
         * 注册
         */
        register("注册");

        Status(String description) {
            this.description = description;
        }

        private String description;

        public String getDescription() {
            return description;
        }

        public void setDescription(String description) {
            this.description = description;
        }
    }

    private Type type;

    private Status status;

    private String code;

    private String telephone;
}
