using Domain.Entities.Forum.Boards;
using Domain.Entities.Forum.Posts;
using Domain.Entities.Members;
using Domain.Entities.Forum.ValueObject;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Domain.Entities.Forum.Comments
{
    public class CommentReaction
    {
        [ForeignKey(nameof(BoardID))]
        public virtual Board Board { get; set; } = null!;

        [ForeignKey(nameof(PostID))]
        public virtual Post Post { get; set; } = null!;

        [ForeignKey(nameof(CommentID))]
        public virtual Comment Comment { get; set; } = null!;

        [ForeignKey(nameof(MemberID))]
        public virtual Member Member { get; set; } = null!;

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

        public int BoardID { get; set; }

        public int PostID { get; set; }

        public int CommentID { get; set; }

        public int MemberID { get; set; }

        public Reaction Reaction { get; set; }

        public string? IpAddress { get; set; }

        public string? UserAgent { get; set; }

        public DateTime? UpdatedAt { get; set; }

        public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
    }
}