using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace FoodShop.Models
{
    public class Notizia
    {
        [Key]
        public int Id { get; set; }

        [StringLength(92), Display(Name = "Titolo")]
        public string Title { get; set; }

        [StringLength(184), Display(Name = "Sotto Titolo")]
        public string Subtitle { get; set; }

        [DataType(DataType.MultilineText)]
        public string Newtext { get; set; }

        [DisplayName("Data di Registrazione")]
        [DataType(DataType.Date)]
        [DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}", ApplyFormatInEditMode = false)]
        [Column(TypeName = "datetime2")]
        public DateTime DateCreated { get; set; }

        [DefaultValue(false)]
        public bool Deleted { get; set; }

    }
}
