CommentMedia.cs 879 B

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