package com.yihu.jw.entity.iot.gateway;

import com.yihu.jw.entity.IntegerIdentityEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import java.sql.Timestamp;
import java.util.Date;

/**
 * GcTokenLog entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "gc_token_log")
@SequenceGenerator(name="id_generated", sequenceName="GC_TOKEN_LOG_SQU")
public class GcTokenLog extends IntegerIdentityEntity implements java.io.Serializable {

    // Fields

    private String ip;
    private String appIp;
    private String accesstoken;
    private Integer flag; //获取1 成功 0失败
    private String message;
    private Date createTime;

    // Constructors

    /**
     * default constructor
     */
    public GcTokenLog() {
    }

    /**
     * full constructor
     */
    public GcTokenLog(String ip, String appIp, String tokenId, Integer flag,
                      String message, Timestamp createTime) {
        this.ip = ip;
        this.appIp = appIp;
        this.flag = flag;
        this.message = message;
        this.createTime = createTime;
    }

    @Column(name = "ip")
    public String getIp() {
        return this.ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    @Column(name = "app_ip")
    public String getAppIp() {
        return this.appIp;
    }

    public void setAppIp(String appIp) {
        this.appIp = appIp;
    }


    @Column(name = "accesstoken")
    public String getAccesstoken() {
        return accesstoken;
    }

    public void setAccesstoken(String accesstoken) {
        this.accesstoken = accesstoken;
    }


    @Column(name = "flag")
    public Integer getFlag() {
        return this.flag;
    }

    public void setFlag(Integer flag) {
        this.flag = flag;
    }

    @Column(name = "message", length = 2000)
    public String getMessage() {
        return this.message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    @Column(name = "create_time", length = 0)
    public Date getCreateTime() {
        return this.createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

}