diff --git a/ImageBoardServerApp/Data/CommentData.cs b/ImageBoardServerApp/Data/CommentData.cs index fff66be..f61c1c5 100644 --- a/ImageBoardServerApp/Data/CommentData.cs +++ b/ImageBoardServerApp/Data/CommentData.cs @@ -9,38 +9,33 @@ public class CommentData [DatabaseGenerated((DatabaseGeneratedOption.Identity))] [Key] public int CommentID { get; set; } - - [Required] - public int PostID { get; set; } - + + [Required] public int PostID { get; set; } + //[ForeignKey("PostID")] public virtual PostData Post { get; set; } - [Required] - public int UserID { get; set; } - + [Required] public int UserID { get; set; } + //[ForeignKey("UserID")] public virtual UserData User { get; set; } - + //[ForeignKey("ImageID")] public virtual ImageData? Image { get; set; } - + public int? ImageID { get; set; } - - [Required] - public string Content { get; set; } - - [Required] - public string Username { get; set; } - - [Required] - public string Board { get; set; } - - [Required] - public long CreatedAt { get; set; } - + + [Required] public string Content { get; set; } + + [Required] public string Username { get; set; } + + [Required] public string Board { get; set; } + + [Required] public long CreatedAt { get; set; } + public ReportData? Report { get; set; } - + public int GET { get; set; } - + + public bool shouldAnon { get; set; } } \ No newline at end of file diff --git a/ImageBoardServerApp/Data/PostData.cs b/ImageBoardServerApp/Data/PostData.cs index 1ba078d..845aaf6 100644 --- a/ImageBoardServerApp/Data/PostData.cs +++ b/ImageBoardServerApp/Data/PostData.cs @@ -10,42 +10,37 @@ public class PostData [Key] public int PostID { get; set; } - [Required] - public int UserID { get; set; } - + [Required] public int UserID { get; set; } + //[ForeignKey("UserID")] public UserData User { get; set; } - - [Required] - public int ImageID { get; set; } - + + [Required] public int ImageID { get; set; } + //[ForeignKey("ImageID")] public ImageData Image { get; set; } - [Required] - public string Username { get; set; } - - [Required] - public string Title { get; set; } - - [Required] - public string Content { get; set; } - + [Required] public string Username { get; set; } + + [Required] public string Title { get; set; } + + [Required] public string Content { get; set; } + public int Interactions { get; set; } - - [Required] - public long CreatedAt { get; set; } - - [Required] - public string Board { get; set; } - + + [Required] public long CreatedAt { get; set; } + + [Required] public string Board { get; set; } + public List Comments { get; set; } - + public ReportData? Report { get; set; } public bool IsSticky { get; set; } - + public bool IsLocked { get; set; } - + public int GET { get; set; } + + public bool shouldAnon { get; set; } } \ No newline at end of file