/**
 * Company Name : 中贸促信息技术有限责任公司
 * Project Name:tgaWebsite
 * File Name:NewsInfo.java
 * Package Name:ccpit.business.newsManage
 * Date:2017年3月21日下午1:55:06
 * Copyright (c) 2017, dingwei@ccpit.org All Rights Reserved.
 *
 */

package org.ccpit.business.newsManage;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.ccpit.base.user.User;
import org.hibernate.annotations.Where;

/**
 * ClassName:NewsInfo <br/>
 * Function: TODO 新闻信息实体类. <br/>
 * Reason: TODO ADD REASON. <br/>
 * Date: 2017年3月21日 下午1:55:06 <br/>
 * 
 * @author dingwei
 * @version
 * @since JDK 1.8.0
 * @see
 */
@Entity
@Where(clause = "deleted='false'")
@Table(name = "sfzx_NewsInfo")
public class NewsInfo {

	public long id;
	/**
	 * 标题
	 */
	public String title;
	/**
	 * 简介
	 */
	public String introduction;
	/**
	 * 新闻图片
	 */
	public String imagePath;
	/**
	 * 新闻内容
	 */
	@Column(columnDefinition = "text")
	public String newsContent;
	/**
	 * 新闻来源
	 */
	public String newsSource;
	/**
	 * 新闻类型 1表示普通新闻 | 2表示优惠原产地证新闻
	 */
	public int newsType;
	/**
	 * 创建人
	 */
	public User creator;
	/**
	 * 创建时间
	 */
	public Date createTime;
	/**
	 * 修改人
	 */
	public User modifyBy;
	/**
	 * 修改时间
	 */
	public Date modifyTime;
	/**
	 * 逻辑删除
	 */
	public boolean deleted;
	/**
	 * 新闻状态 初始状态为 0
	 */
	public int infotatus;
	/**
	 * 点击量
	 */
	public int clickVolume;
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	public long getId() {
		return id;
	}

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

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getIntroduction() {
		return introduction;
	}

	public void setIntroduction(String introduction) {
		this.introduction = introduction;
	}

	public String getImagePath() {
		return imagePath;
	}

	public void setImagePath(String imagePath) {
		this.imagePath = imagePath;
	}

	public String getNewsContent() {
		return newsContent;
	}

	public void setNewsContent(String newsContent) {
		this.newsContent = newsContent;
	}

	public String getNewsSource() {
		return newsSource;
	}

	public void setNewsSource(String newsSource) {
		this.newsSource = newsSource;
	}

	public int getNewsType() {
		return newsType;
	}

	public void setNewsType(int newsType) {
		this.newsType = newsType;
	}

	@OneToOne
	public User getCreator() {
		return creator;
	}

	public void setCreator(User creator) {
		this.creator = creator;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@OneToOne
	public User getModifyBy() {
		return modifyBy;
	}

	public void setModifyBy(User modifyBy) {
		this.modifyBy = modifyBy;
	}

	public Date getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}

	public boolean isDeleted() {
		return deleted;
	}

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

	@Column(columnDefinition = "INT default 0")
	public int getInfotatus() {
		return infotatus;
	}

	public void setInfotatus(int infotatus) {
		this.infotatus = infotatus;
	}

	public int getClickVolume() {
		return clickVolume;
	}

	public void setClickVolume(int clickVolume) {
		this.clickVolume = clickVolume;
	}


}
