using System;
using System.Collections.Generic;
using System.Text;

namespace Model
{
    /// <summary>
    /// 网站新闻对象
    /// </summary>
    [Serializable]
    public class News
    {
        #region 私有对象
        private long _systemId;
        private string _title;
        private string _context;
        private DateTime _publishtime;
        #endregion

        #region 构造函数
        /// <summary>
        /// 新闻对象构造函数
        /// </summary>
        /// <param name="title">新闻标题</param>
        /// <param name="context">新闻正文</param>
        public News(string title, string context)
        {
            this._title = title;
            this._context = context;
        }
        /// <summary>
        /// 虚构函数
        /// </summary>
        public News()
        {

        }
        /// <summary>
        /// 新闻对象构造函数
        /// </summary>
        /// <param name="systemid">新闻编号</param>
        /// <param name="title">新闻标题</param>
        /// <param name="context">新闻正文</param>
        /// <param name="publishtime">发布时间</param>
        public News(long systemid, string title, string context,DateTime publishtime)
        {
            this._systemId = systemid;
            this._title = title;
            this._context = context;
            this._publishtime = publishtime;
        }
        #endregion

        #region 属性
        /// <summary>
        /// 新闻编号
        /// </summary>
        public long SystemId
        {
            get { return this._systemId; }
            set { this._systemId = value; }
        }
        /// <summary>
        /// 发布时间
        /// </summary>
        public DateTime PublishTime
        {
            get { return this._publishtime; }
            set { this._publishtime= value; }
        }
        /// <summary>
        /// 新闻标题
        /// </summary>
        public string Title
        {
            get { return this._title; }
            set { this._title = value; }
        }
        /// <summary>
        /// 新闻正文
        /// </summary>
        public string Context
        {
            get { return this._context; }
            set { this._context = value; }
        }
        #endregion
    }
}
