2023-01-18 12:56:24 +00:00
|
|
|
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; }
|
|
|
|
|
2023-06-13 05:48:14 +00:00
|
|
|
[Required] public int UserID { get; set; }
|
|
|
|
|
2023-01-18 12:56:24 +00:00
|
|
|
//[ForeignKey("UserID")]
|
|
|
|
public UserData User { get; set; }
|
2023-06-13 05:48:14 +00:00
|
|
|
|
|
|
|
[Required] public int ImageID { get; set; }
|
|
|
|
|
2023-01-18 12:56:24 +00:00
|
|
|
//[ForeignKey("ImageID")]
|
|
|
|
public ImageData Image { get; set; }
|
|
|
|
|
2023-06-13 05:48:14 +00:00
|
|
|
[Required] public string Username { get; set; }
|
|
|
|
|
|
|
|
[Required] public string Title { get; set; }
|
|
|
|
|
|
|
|
[Required] public string Content { get; set; }
|
|
|
|
|
2023-01-25 16:26:21 +00:00
|
|
|
public int Interactions { get; set; }
|
2023-06-13 05:48:14 +00:00
|
|
|
|
|
|
|
[Required] public long CreatedAt { get; set; }
|
|
|
|
|
|
|
|
[Required] public string Board { get; set; }
|
|
|
|
|
2023-01-18 12:56:24 +00:00
|
|
|
public List<CommentData> Comments { get; set; }
|
2023-06-13 05:48:14 +00:00
|
|
|
|
2023-02-11 14:47:39 +00:00
|
|
|
public ReportData? Report { get; set; }
|
2023-02-24 23:08:36 +00:00
|
|
|
|
|
|
|
public bool IsSticky { get; set; }
|
2023-06-13 05:48:14 +00:00
|
|
|
|
2023-02-24 23:08:36 +00:00
|
|
|
public bool IsLocked { get; set; }
|
2023-06-13 05:48:14 +00:00
|
|
|
|
2023-03-11 01:50:07 +00:00
|
|
|
public int GET { get; set; }
|
2023-06-13 05:48:14 +00:00
|
|
|
|
|
|
|
public bool shouldAnon { get; set; }
|
2023-01-18 12:56:24 +00:00
|
|
|
}
|