package com.goafanti.news.bo;

import java.util.Date;

import org.apache.commons.lang3.time.DateFormatUtils;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonFormat.Shape;
import com.goafanti.common.constant.AFTConstants;

public class NewsSummary {
	/**
	 * 主键
	 */
	private Long	id;

	/**
	 * 创建时间
	 */
	private Date	createTime;

	/**
	 * 标题
	 */
	private String	title;

	/**
	 * 题图url
	 */
	private String	titleImg;

	/**
	 * 类型
	 */
	private Integer	type;

	/**
	 * 是否放在首页
	 */
	private Integer	hot;

	/**
	 * 简介
	 */
	private String	summary;
	
	/**
	 * 来源
	 */
	private String	source;
	
	/**
	 * 审核状态
	 */
	private Integer auditStatus;
	
	/**
	 * 是否发布
	 */
	private Integer releaseStatus;

	@JsonFormat(shape = Shape.STRING)
	public Long getId() {
		return id;
	}

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

	public Integer getAuditStatus() {
		return auditStatus;
	}

	public void setAuditStatus(Integer auditStatus) {
		this.auditStatus = auditStatus;
	}

	public Integer getReleaseStatus() {
		return releaseStatus;
	}

	public void setReleaseStatus(Integer releaseStatus) {
		this.releaseStatus = releaseStatus;
	}

	public Date getCreateTime() {
		return createTime;
	}

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

	public String getTitle() {
		return title;
	}

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

	public String getTitleImg() {
		return titleImg;
	}

	public void setTitleImg(String titleImg) {
		this.titleImg = titleImg;
	}

	public Integer getType() {
		return type;
	}

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

	public Integer getHot() {
		return hot;
	}

	public void setHot(Integer hot) {
		this.hot = hot;
	}

	public String getSummary() {
		return summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}
	public String getCreateTimeFormattedDate() {
		if (this.createTime == null) {
			return null;
		} else {
			return DateFormatUtils.format(this.createTime, AFTConstants.YYYYMMDD);
		}
	}
	public String getCreateTimeFormattedDate_md() {
		if (this.createTime == null) {
			return null;
		} else {
			return DateFormatUtils.format(this.createTime, AFTConstants.MMDD);
		}
	}
	public String getCreateTimeFormattedDate_y() {
		if (this.createTime == null) {
			return null;
		} else {
			return DateFormatUtils.format(this.createTime, AFTConstants.YYYY);
		}
	}

	public void setCreateTimeFormattedDate(String createTimeFormattedDate) {

	}
	public void setCreateTimeFormattedDate_md(String createTimeFormattedDate) {

	}
	public void setCreateTimeFormattedDate_y(String createTimeFormattedDate) {

	}

}
