PostLink.cs 764 B

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