package net.northking.cctp.common.persistence;


import net.northking.cctp.common.persistence.rule.CreatedUpdatedRule;
import net.northking.cctp.common.persistence.rule.LogicDeletedRule;
import net.northking.cctp.common.persistence.rule.RevisionRule;

import javax.persistence.MappedSuperclass;
import java.util.Date;

/**
 * 通用业务实体基类
 *
 * @author xiusong.xie
 * @since 2.4
 */
@MappedSuperclass
public abstract class BizEntity extends NamedEntity implements CreatedUpdatedRule, LogicDeletedRule, RevisionRule
{
  /**
   * 创建人
   */
  private String createdBy;
  /**
   * 创建时间
   */
  private Date createdTime;
  /**
   * 更新人
   */
  private String updatedBy;
  /**
   * 更新时间
   */
  private Date updatedTime;

  /**
   * 启用/禁用
   */
  private Boolean isEnabled;

  /**
   * 已删除
   */
  private Boolean isDeleted;

  /**
   * 乐观锁
   */
  private String revision;

  public String getCreatedBy()
  {
    return createdBy;
  }

  public void setCreatedBy(String createdBy)
  {
    this.createdBy = createdBy;
  }

  public Date getCreatedTime()
  {
    return createdTime;
  }

  public void setCreatedTime(Date createdTime)
  {
    this.createdTime = createdTime;
  }

  public String getUpdatedBy()
  {
    return updatedBy;
  }

  public void setUpdatedBy(String updatedBy)
  {
    this.updatedBy = updatedBy;
  }

  public Date getUpdatedTime()
  {
    return updatedTime;
  }

  public void setUpdatedTime(Date updatedTime)
  {
    this.updatedTime = updatedTime;
  }

  public Boolean getDeleted()
  {
    return isDeleted;
  }

  public void setDeleted(Boolean deleted)
  {
    isDeleted = deleted;
  }

  public Boolean getEnabled()
  {
    return isEnabled;
  }

  public void setEnabled(Boolean enabled)
  {
    isEnabled = enabled;
  }

  public String getRevision()
  {
    return revision;
  }

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