package com.ywt.outpatient.domain.entity.center;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 不良反应表
 */
@Table(name = "adverse_reaction")
@Entity
public class AdverseReaction implements Serializable {
  private static final long serialVersionUID = 1L;

  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(name = "id", insertable = false, nullable = false)
  private Integer id;

  /**
   * 名称
   */
  @Column(name = "name", nullable = false)
  private String name;

  /**
   * 创建时间
   */
  @Column(name = "create_time", nullable = false)
  private Date createTime;

  /**
   * 更新时间
   */
  @Column(name = "update_time", nullable = false)
  private Date updateTime;

  /**
   * 删除标识：0-未删除；1-已删除
   */
  @Column(name = "deleted", nullable = false)
  private Integer deleted = 0;


  /**
   * type:1-不良反应列表，2-不良反应的满意度评分
   */
  @Column(name = "type")
  private Integer type;


  /**
   * 权重，用type进行分组之后的排序，从小到大开始排
   */
  @Column(name = "weight")
  private Integer weight = 0;

  /**
   * 对应给前端的字段名
   */
  @Column(name = "field_name")
  private String fieldName;

  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }

  /**
   * 名称
   */
  public String getName() {
    return name;
  }

  /**
   * 名称
   */
  public void setName(String name) {
    this.name = name;
  }

  /**
   * 创建时间
   */
  public Date getCreateTime() {
    return createTime;
  }

  /**
   * 创建时间
   */
  public void setCreateTime(Date createTime) {
    this.createTime = createTime;
  }

  /**
   * 更新时间
   */
  public Date getUpdateTime() {
    return updateTime;
  }

  /**
   * 更新时间
   */
  public void setUpdateTime(Date updateTime) {
    this.updateTime = updateTime;
  }

  /**
   * 删除标识：0-未删除；1-已删除
   */
  public Integer getDeleted() {
    return deleted;
  }

  /**
   * 删除标识：0-未删除；1-已删除
   */
  public void setDeleted(Integer deleted) {
    this.deleted = deleted;
  }

  public Integer getType() {
    return type;
  }

  public void setType(Integer type) {
    this.type = type;
  }

  public Integer getWeight() {
    return weight;
  }

  public void setWeight(Integer weight) {
    this.weight = weight;
  }

  public String getFieldName() {
    return fieldName;
  }

  public void setFieldName(String fieldName) {
    this.fieldName = fieldName;
  }

  public String toString() {
    return "AdverseReaction{id=" + id + 
      ", name=" + name + 
      ", createTime=" + createTime + 
      ", updateTime=" + updateTime + 
      ", deleted=" + deleted + 
      ", type=" + type +
      ", weight=" + weight +
      ", fieldName=" + fieldName +
      "}";
  }
}