package com.publiccms.entities.sys;
// Generated 2016-7-16 11:17:19 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;

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

    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    /**
     * uuid
     */
    @GeneratorColumn(title = "ID")
    private String uuid;
    /**
     * startup date<p>
     * 启动日期
     */
    @GeneratorColumn(title = "启动时间", order = true)
    private Date createDate;
    /**
     * heart beat date<p>
     * 上次心跳日期
     */
    @GeneratorColumn(title = "心跳时间", condition = true, order = true)
    private Date heartbeatDate;
    /**
     * master<p>
     * 管理节点
     */
    @GeneratorColumn(title = "管理节点", condition = true)
    private boolean master;
    /**
     * cms version<p>
     * cms版本
     */
    @GeneratorColumn(title = "版本", condition = true)
    private String cmsVersion;
    /**
     * revision<p>
     * 修改版本
     */
    @GeneratorColumn(title = "修订版本")
    private String revision;

    public SysCluster() {
    }

    public SysCluster(String uuid, Date createDate, Date heartbeatDate, boolean master) {
        this.uuid = uuid;
        this.createDate = createDate;
        this.heartbeatDate = heartbeatDate;
        this.master = master;
    }

    public SysCluster(String uuid, Date createDate, Date heartbeatDate, boolean master, String cmsVersion, String revision) {
        this.uuid = uuid;
        this.createDate = createDate;
        this.heartbeatDate = heartbeatDate;
        this.master = master;
        this.cmsVersion = cmsVersion;
        this.revision = revision;
    }

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

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

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

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

    @Column(name = "heartbeat_date", nullable = false, length = 19)
    public Date getHeartbeatDate() {
        return this.heartbeatDate;
    }

    public void setHeartbeatDate(Date heartbeatDate) {
        this.heartbeatDate = heartbeatDate;
    }

    @Column(name = "master", nullable = false)
    public boolean isMaster() {
        return this.master;
    }

    public void setMaster(boolean master) {
        this.master = master;
    }

    @Column(name = "cms_version", length = 20)
    public String getCmsVersion() {
        return this.cmsVersion;
    }

    public void setCmsVersion(String cmsVersion) {
        this.cmsVersion = cmsVersion;
    }

    @Column(name = "revision", length = 20)
    public String getRevision() {
        return this.revision;
    }

    public void setRevision(String revision) {
        this.revision = revision;
    }

}
