package com.yihu.jw.entity.hospital.article;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.UuidIdentityEntity;

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

/**
 * 健康文章
 * @author huangwenjie
 * @date 2019/9/10 13:58
 */
@Entity
@Table(name = "wlyy_knowledge_article")
public class KnowledgeArticleDO extends UuidIdentityEntity {
	
	private String createUser; // 创建人
	private String createUserName; // 创建人
	private String createUserDept; // 创建人科室CODE
	private String createUserDeptName; // 创建人科室名称
	private String title;   // 文章标题
	private String categoryFirst;    // 1级分类标识
	private String categoryFirstName;    // 1级分类标识
	private String categorySecond;    // 2级分类标识
	private String categorySecondName;    // 2级分类标识
	private String content; // 文章内容
	private String source;  // 文章来源--客服
	private String image;   // 封面图片
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	private Date createTime;  // 添加时间
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	private Date updateTime;  // 编辑时间
	private Integer del; // 是否删除，1正常，0删除
	private Integer status;// 0未审核 1已审核
	private String cancelReason;//退回理由
	private Integer used;//常用数
	private Integer readCount;//已读数
	private Integer collection;//收藏数量
	private Integer fabulous;//点赞数量
	@Column(name = "is_share")
	private Integer share;//分享 数量
	private String intro;//简介

	@Transient
	private Integer isUsed;//是否已设置常用

	@Transient
	private KnowledgeArticleUserDO knowledgeArticleUserDO;

	@Transient
	private String deptName;
	@Transient
	private String hospitalName;
	
	
	public String getCreateUser() {
		return createUser;
	}
	
	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}
	
	public String getTitle() {
		return title;
	}
	
	public void setTitle(String title) {
		this.title = title;
	}
	
	public String getCategoryFirst() {
		return categoryFirst;
	}
	
	public void setCategoryFirst(String categoryFirst) {
		this.categoryFirst = categoryFirst;
	}
	
	public String getCategorySecond() {
		return categorySecond;
	}
	
	public void setCategorySecond(String categorySecond) {
		this.categorySecond = categorySecond;
	}
	
	public String getContent() {
		return content;
	}
	
	public void setContent(String content) {
		this.content = content;
	}
	
	public String getSource() {
		return source;
	}
	
	public void setSource(String source) {
		this.source = source;
	}
	
	public String getImage() {
		return image;
	}
	
	public void setImage(String image) {
		this.image = image;
	}
	
	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 getDel() {
		return del;
	}
	
	public void setDel(Integer del) {
		this.del = del;
	}
	
	public Integer getStatus() {
		return status;
	}
	
	public void setStatus(Integer status) {
		this.status = status;
	}
	
	public String getCancelReason() {
		return cancelReason;
	}
	
	public void setCancelReason(String cancelReason) {
		this.cancelReason = cancelReason;
	}
	
	public String getCreateUserName() {
		return createUserName;
	}
	
	public void setCreateUserName(String createUserName) {
		this.createUserName = createUserName;
	}
	
	public String getCategoryFirstName() {
		return categoryFirstName;
	}
	
	public void setCategoryFirstName(String categoryFirstName) {
		this.categoryFirstName = categoryFirstName;
	}
	
	public String getCategorySecondName() {
		return categorySecondName;
	}
	
	public void setCategorySecondName(String categorySecondName) {
		this.categorySecondName = categorySecondName;
	}
	
	public String getCreateUserDept() {
		return createUserDept;
	}
	
	public void setCreateUserDept(String createUserDept) {
		this.createUserDept = createUserDept;
	}
	
	public String getCreateUserDeptName() {
		return createUserDeptName;
	}
	
	public void setCreateUserDeptName(String createUserDeptName) {
		this.createUserDeptName = createUserDeptName;
	}

	public Integer getUsed() {
		return used;
	}

	public void setUsed(Integer used) {
		this.used = used;
	}

	@Transient
	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	@Transient
	public String getHospitalName() {
		return hospitalName;
	}

	public void setHospitalName(String hospitalName) {
		this.hospitalName = hospitalName;
	}

	public Integer getCollection() {
		return collection;
	}

	public void setCollection(Integer collection) {
		this.collection = collection;
	}

	public Integer getFabulous() {
		return fabulous;
	}

	public void setFabulous(Integer fabulous) {
		this.fabulous = fabulous;
	}

	@Column(name = "is_share")
	public Integer getShare() {
		return share;
	}

	public void setShare(Integer share) {
		this.share = share;
	}

	public Integer getReadCount() {
		return readCount;
	}

	public void setReadCount(Integer readCount) {
		this.readCount = readCount;
	}

	@Transient
	public Integer getIsUsed() {
		return isUsed;
	}

	public void setIsUsed(Integer isUsed) {
		this.isUsed = isUsed;
	}

	@Transient
	public KnowledgeArticleUserDO getKnowledgeArticleUserDO() {
		return knowledgeArticleUserDO;
	}

	public void setKnowledgeArticleUserDO(KnowledgeArticleUserDO knowledgeArticleUserDO) {
		this.knowledgeArticleUserDO = knowledgeArticleUserDO;
	}

	public String getIntro() {
		return intro;
	}

	public void setIntro(String intro) {
		this.intro = intro;
	}
}
