| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- using Domain.Entities.Forum.Boards;
- using Domain.Entities.Forum.Posts;
- using System.ComponentModel.DataAnnotations;
- using System.ComponentModel.DataAnnotations.Schema;
- namespace Domain.Entities.Forum.Comments
- {
- public class CommentImage
- {
- [ForeignKey(nameof(BoardID))]
- public virtual Board Board { get; set; } = null!;
- [ForeignKey(nameof(PostID))]
- public virtual Post Post { get; set; } = null!;
- [ForeignKey(nameof(CommentID))]
- public virtual Comment Comment { get; set; } = null!;
- [Key]
- public int ID { get; set; }
- public int BoardID { get; set; }
- public int PostID { get; set; }
- public int CommentID { get; set; }
- public Guid UUID { get; set; } = Guid.NewGuid();
- public string FileName { get; set; } = default!;
- public string HashedName { get; set; } = default!;
- public string Path { get; set; } = null!;
- public string Url { get; set; } = null!;
- public string? Extension { get; set; }
- public string? ContentType { get; set; }
- public long? Size { get; set; }
- public short? Width { get; set; }
- public short? Height { get; set; }
- public bool IsDisabled { get; set; } = false;
- public DateTime? DisabledAt { get; set; }
- public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
- }
- }
|