CommentLink.cs 956 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. public class CommentLink
  7. {
  8. [ForeignKey(nameof(BoardID))]
  9. public virtual Board Board { get; set; } = null!;
  10. [ForeignKey(nameof(PostID))]
  11. public virtual Post Post { get; set; } = null!;
  12. [ForeignKey(nameof(CommentID))]
  13. public virtual Comment Comment { get; set; } = null!;
  14. [Key]
  15. public int ID { get; set; }
  16. public int BoardID { get; set; }
  17. public int PostID { get; set; }
  18. public int CommentID { get; set; }
  19. public Guid UUID { get; set; }
  20. public string Url { get; set; } = default!;
  21. public int Clicks { get; set; } = 0;
  22. public bool IsDisabled { get; set; } = false;
  23. public DateTime? DisabledAt { get; set; }
  24. public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
  25. }