using Domain.Entities.Forum.Boards;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

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

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

        [ForeignKey(nameof(TagID))]
        public Tag Tag { get; set; } = null!;

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

        public int BoardID { get; set; }

        public int PostID { get; set; }

        public int TagID { get; set; }

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