CommentMedia.cs 953 B

123456789101112131415161718192021222324252627282930313233343536
  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 CommentMedia
  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 string Url { get; set; } = default!;
  21. public bool IsDisabled { get; set; } = false;
  22. public DateTime? DisabledAt { get; set; }
  23. public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
  24. }
  25. }