CommentLink.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using Domain.Entities.Forum.Boards;
  2. using Domain.Entities.Forum.Posts;
  3. using System.ComponentModel.DataAnnotations;
  4. using System.ComponentModel.DataAnnotations.Schema;
  5. namespace Domain.Entities.Forum.Comments
  6. {
  7. public class CommentLink
  8. {
  9. [ForeignKey(nameof(BoardID))]
  10. public virtual Board Board { get; set; } = null!;
  11. [ForeignKey(nameof(PostID))]
  12. public virtual Post Post { get; set; } = null!;
  13. [ForeignKey(nameof(CommentID))]
  14. public virtual Comment Comment { get; set; } = null!;
  15. [Key]
  16. public int ID { get; set; }
  17. public int BoardID { get; set; }
  18. public int PostID { get; set; }
  19. public int CommentID { get; set; }
  20. public Guid UUID { get; set; }
  21. public string Url { get; set; } = default!;
  22. public int Clicks { get; set; } = 0;
  23. public bool IsDisabled { get; set; } = false;
  24. public DateTime? DisabledAt { get; set; }
  25. public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
  26. }
  27. }