package com.publiccms.entities.sys;

// Generated 2016-3-2 20:42:39 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;

/**
 * SysAppToken generated by hbm2java
 */
@Entity
@Table(name = "sys_app_token")
@DynamicUpdate
public class SysAppToken implements java.io.Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    /**
     * auth token<p>
     * 授权验证码
     */
    @GeneratorColumn(title = "授权验证")
    private String authToken;
    /**
     * app id<p>
     * 应用id
     */
    @GeneratorColumn(title = "应用")
    private int appId;
    /**
     * create date<p>
     * 创建日期
     */
    @GeneratorColumn(title = "创建日期", condition = true)
    private Date createDate;
    /**
     * expiry date<p>
     * 过期日期
     */
    @GeneratorColumn(title = "过期日期", condition = true, order = true)
    private Date expiryDate;

    public SysAppToken() {
    }

    public SysAppToken(String authToken, int appId, Date createDate) {
        this.authToken = authToken;
        this.appId = appId;
        this.createDate = createDate;
    }
    public SysAppToken(String authToken, int appId, Date createDate, Date expiryDate) {
        this.authToken = authToken;
        this.appId = appId;
        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 = "app_id", nullable = false)
    public int getAppId() {
        return this.appId;
    }

    public void setAppId(int appId) {
        this.appId = appId;
    }

    @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", length = 19)
    public Date getExpiryDate() {
        return this.expiryDate;
    }

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