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

namespace WebMail.Model
{
    [Table("Events")]
    public class Event
    {
        public Event()
        {
            ID = Guid.NewGuid();
        }

        [Key]
        public Guid ID { get; set; }

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

        public DateTime Start { get; set; }
        
        public DateTime End { get; set; }

        [MaxLength(1024)]
        public string RecurrenceRule { get; set; }

        public int? RecurrenceParentID { get; set; }

        [MaxLength(253)]
        public string Location { get; set; }

        [MaxLength(1024)]
        public string Invitees { get; set; }

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

        [MaxLength(1024)]
        public string TimeZoneID { get; set; }
    }
}