2023-01-18 13:56:24 +01:00
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
|
|
|
namespace ImageBoardServerApp.Data;
|
|
|
|
|
|
|
|
public class CommentData
|
|
|
|
{
|
|
|
|
[Required]
|
|
|
|
[DatabaseGenerated((DatabaseGeneratedOption.Identity))]
|
|
|
|
[Key]
|
|
|
|
public int CommentID { get; set; }
|
2023-06-13 07:48:14 +02:00
|
|
|
|
|
|
|
[Required] public int PostID { get; set; }
|
|
|
|
|
2023-01-18 13:56:24 +01:00
|
|
|
//[ForeignKey("PostID")]
|
|
|
|
public virtual PostData Post { get; set; }
|
|
|
|
|
2023-06-13 07:48:14 +02:00
|
|
|
[Required] public int UserID { get; set; }
|
|
|
|
|
2023-01-18 13:56:24 +01:00
|
|
|
//[ForeignKey("UserID")]
|
2023-01-26 09:07:25 +01:00
|
|
|
public virtual UserData User { get; set; }
|
2023-06-13 07:48:14 +02:00
|
|
|
|
2023-01-18 13:56:24 +01:00
|
|
|
//[ForeignKey("ImageID")]
|
2023-01-26 13:04:55 +01:00
|
|
|
public virtual ImageData? Image { get; set; }
|
2023-06-13 07:48:14 +02:00
|
|
|
|
2023-01-26 13:04:55 +01:00
|
|
|
public int? ImageID { get; set; }
|
2023-06-13 07:48:14 +02:00
|
|
|
|
|
|
|
[Required] public string Content { get; set; }
|
|
|
|
|
|
|
|
[Required] public string Username { get; set; }
|
|
|
|
|
|
|
|
[Required] public string Board { get; set; }
|
|
|
|
|
|
|
|
[Required] public long CreatedAt { get; set; }
|
|
|
|
|
2023-02-11 15:47:39 +01:00
|
|
|
public ReportData? Report { get; set; }
|
2023-06-13 07:48:14 +02:00
|
|
|
|
2023-03-11 02:50:07 +01:00
|
|
|
public int GET { get; set; }
|
2023-06-13 07:48:14 +02:00
|
|
|
|
|
|
|
public bool shouldAnon { get; set; }
|
2023-01-18 13:56:24 +01:00
|
|
|
}
|