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

namespace WebMail.Model
{
    [Table("Messages")]
    public class Message
    {
        public Message()
        {
        }

        [Key] 
        public int MessageID { get; set; }

        public int FolderId { get; set; }

        [StringLength(int.MaxValue)]
        public string Body { get; set; }

        [MaxLength(256)] 
        public string From { get; set; }

        [MaxLength(256)]
        public string Email { get; set; }

        [MaxLength(256)] 
        public string Subject { get; set; }

        public DateTime? Received { get; set; }

        public bool IsRead { get; set; }
    }
}