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

namespace Domain.Entities.Forum.Logs
{
    public class PostViewLog
    {
        [ForeignKey(nameof(PostID))]
        public Post Post { get; set; } = null!;

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

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

        public int PostID { get; set; }

        public int? MemberID { get; set; }

        public string? IpAddress { get; set; }

        public string? UserAgent { get; set; }

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