package com.yc.education.model;

import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * 新闻中心 新闻实体类
 * @author Hickey
 * @create 2019-07-23 10:58
 */
@Table (name="newscenter")
public class NewsCenter {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)

    private Integer id;//主键id

    private Integer typeid;//外键类别id

    private String newsname;//新闻名称

    private String newsinfo;//新闻简介

    private String newsdetail;//新闻详细信息

    private String newsimage;//新闻图片

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date   newstime;//新闻发布时间

    /**
     * 主键id
     * @return id
     */
    public Integer getId() {
        return id;
    }

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

    /**
     * 外键类别id
     * @return typeid
     */
    public Integer getTypeid() {
        return typeid;
    }

    public void setTypeid(Integer typeid) {
        this.typeid = typeid;
    }

    /**
     * 新闻名称
     * @return newsname
     */
    public String getNewsname() {
        return newsname;
    }

    public void setNewsname(String newsname) {
        this.newsname = newsname;
    }

    /**
     * 新闻简介
     * @return newsinfo
     */
    public String getNewsinfo() {
        return newsinfo;
    }

    public void setNewsinfo(String newsinfo) {
        this.newsinfo = newsinfo;
    }

    /**
     * 新闻详情
     * @return newsdetail
     */
    public String getNewsdetail() {
        return newsdetail;
    }

    public void setNewsdetail(String newsdetail) {
        this.newsdetail = newsdetail;
    }

    /**
     * 新闻图片
     * @return newsimage
     */
    public String getNewsimage() {
        return newsimage;
    }

    public void setNewsimage(String newsimage) {
        this.newsimage = newsimage;
    }

    /**
     * 发布时间
     * @return newstime
     */
    public Date getNewstime() {
        return newstime;
    }

    public void setNewstime(Date newstime) {
        this.newstime = newstime;
    }
}
