bulletboards/ImageBoardServerApp/Data/PostData.cs
limited_dev 5a201fd565 feat: added shouldAnon to PostData.cs and CommentData.cs
Signed-off-by: limited_dev <loginakkisativ@gmail.com>
2023-06-13 07:48:14 +02:00

46 lines
No EOL
1 KiB
C#

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace ImageBoardServerApp.Data;
public class PostData
{
[Required]
[DatabaseGenerated((DatabaseGeneratedOption.Identity))]
[Key]
public int PostID { get; set; }
[Required] public int UserID { get; set; }
//[ForeignKey("UserID")]
public UserData User { 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; }
public int Interactions { get; set; }
[Required] public long CreatedAt { get; set; }
[Required] public string Board { get; set; }
public List<CommentData> 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; }
}