package com.publiccms.entities.sys;

// Generated 2016-3-4 18:33:25 by Hibernate Tools 4.3.1

import java.util.Date;

import org.hibernate.annotations.DynamicUpdate;

import com.publiccms.common.generator.annotation.GeneratorColumn;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;

/**
 * SysEmailToken generated by hbm2java
 */
@Entity
@Table(name = "sys_email_token")
@DynamicUpdate
public class SysEmailToken implements java.io.Serializable {
    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    /**
     * auth token<p>
     * 验证授权码
     */
    @GeneratorColumn(title = "验证授权码")
    private String authToken;
    /**
     * user id<p>
     * 用户id
     */
    @GeneratorColumn(title = "用户", condition = true)
    private long userId;
    /**
     * email<p>
     * 邮件地址
     */
    @GeneratorColumn(title = "邮件地址")
    private String email;
    /**
     * create date<p>
     * 创建日期
     */
    @GeneratorColumn(title = "创建日期")
    private Date createDate;
    /**
     * expiry date<p>
     * 过期日期
     */
    @GeneratorColumn(title = "过期日期")
    private Date expiryDate;

    public SysEmailToken() {
    }

    public SysEmailToken(String authToken, long userId, String email, Date createDate, Date expiryDate) {
        this.authToken = authToken;
        this.userId = userId;
        this.email = email;
        this.createDate = createDate;
        this.expiryDate = expiryDate;
    }

    @Id
    @Column(name = "auth_token", unique = true, nullable = false, length = 40)
    public String getAuthToken() {
        return this.authToken;
    }

    public void setAuthToken(String authToken) {
        this.authToken = authToken;
    }

    @Column(name = "user_id", nullable = false)
    public long getUserId() {
        return this.userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    @Column(name = "email", nullable = false, length = 100)
    public String getEmail() {
        return this.email;
    }

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

    @Column(name = "create_date", nullable = false, length = 19)
    public Date getCreateDate() {
        return this.createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Column(name = "expiry_date", nullable = false, length = 19)
    public Date getExpiryDate() {
        return this.expiryDate;
    }

    public void setExpiryDate(Date expiryDate) {
        this.expiryDate = expiryDate;
    }

}
