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

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * 资讯关联表（药商推送给医生）
 * created by daiyihua
 */
@Entity
@Table(name = "articles_union")
public class ArticlesUnion {

    /**
     * 主键Id
     */
    @Id
    private Integer id;

    /**
     * 对应文章表主键ID
     */
    @Column(name = "art_id", nullable = false)
    private Integer artId;

    /**
     * 推送者的ID，此时的推送着为经销商，对应user表的ID
     */
    @Column(name = "user_id")
    private Integer userId;

    /**
     * 对象ID
     */
    @Column(name = "obj_id", nullable = false)
    private Integer objId;

    /**
     * 类型，和obj_id匹配，1-表示医生ID，2-经销商ID
     */
    @Column(name = "type", nullable = false)
    private Integer type;

    /**
     * 状态，位运算，0-未读，1-已读，2-是否在用户端展示
     */
    @Column(name = "status", nullable = false)
    private Integer status;

    /**
     * 是否删除
     */
    @Column(name = "deleted", nullable = false)
    private Boolean deleted;

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

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

    public Integer getId() {
        return id;
    }

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

    public Integer getArtId() {
        return artId;
    }

    public void setArtId(Integer artId) {
        this.artId = artId;
    }

    public Boolean getDeleted() {
        return deleted;
    }

    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    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;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getObjId() {
        return objId;
    }

    public void setObjId(Integer objId) {
        this.objId = objId;
    }

    public Integer getType() {
        return type;
    }

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

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
}
