package com.uas.platform.b2b.manage.model;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 生成秘钥记录
 *
 * Created by hejq on 2018-04-27.
 */
@Table(name = "secretkey")
@Entity
public class SecretKeyRecord implements Serializable {

    /**
     * 序列号
     */
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     * 邮箱
     */
    @Column(name = "email")
    private String email;

    /**
     * 是否可用 1.yes 0.no
     */
    @Column(name = "enable")
    private Short enable;

    /**
     * 秘钥
     */
    @Column(name = "secretkey")
    private String secretKey;

    /**
     * 生成时间
     */
    @Column(name = "time")
    private Long time;

    public SecretKeyRecord(String email, String secretKey) {
        this.email = email;
        this.secretKey = secretKey;
        this.time = System.currentTimeMillis();
    }

    public SecretKeyRecord() {
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Short getEnable() {
        return enable;
    }

    public void setEnable(Short enable) {
        this.enable = enable;
    }

    public String getSecretKey() {
        return secretKey;
    }

    public void setSecretKey(String secretKey) {
        this.secretKey = secretKey;
    }

    public Long getTime() {
        return time;
    }

    public void setTime(Long time) {
        this.time = time;
    }
}
