PostLink.cs 834 B

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