namespace boilerplate.Models
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.Web.Mvc;

    // This is the metadata class where we define display names and validation rules.
    public class NewsMetadata
    {
        [Display(Name = "عنوان خبر")]
        [Required(ErrorMessage = "لطفاً عنوان خبر را وارد کنید.")]
        public string News_Title { get; set; }

        [Display(Name = "توضیحات کامل")]
        [AllowHtml]
        [Required(ErrorMessage = "لطفاً توضیحات خبر را وارد کنید.")]
        public string News_Description { get; set; }

        [Display(Name = "خلاصه خبر")]
        public string News_Summary { get; set; }

        [Display(Name = "دسته بندی")]
        public string News_Category { get; set; }

        [Display(Name = "تگ‌ها")]
        public string News_Tag { get; set; }

        [Display(Name = "تاریخ نمایش")]
        public Nullable<System.DateTime> News_Date { get; set; }

        [Display(Name = "تصویر شاخص")]
        public string News_IMG { get; set; }
    }

    [MetadataType(typeof(NewsMetadata))]
    public partial class News
    {
        // This part remains empty.
    }
}
