﻿using System;
using System.ComponentModel.DataAnnotations;
using HockeyApp.Models.Interfaces;
using HockeyApp.Models.Users;
using System.ComponentModel.DataAnnotations.Schema;

namespace HockeyApp.Models.Announcements
{
    [Table("TournamentAnnouncementResponseNotes", Schema = "ads")]
    public class TournamentAnnouncementResponseNote : IHistoryTrackableEntity
    {
        public long Id { get; set; }

        public long TournamentAnnouncementResponseId { get; set; }
        public virtual TournamentAnnouncementResponse TournamentAnnouncementResponse { get; set; }

        [Required]
        [StringLength(1000)]
        public string Text { get; set; }

        [Column(TypeName = "datetime")]
        public DateTime CreateDate { get; set; }

        [ForeignKey("Creator")]
        public long CreatorId { get; set; }
        public virtual User Creator { get; set; }

        [ForeignKey("Editor")]
        public long? EditorId { get; set; }
        public virtual User Editor { get; set; }

        public DateTime? EditDate { get; set; }
    }
}
