43 lines
939 B
C#
43 lines
939 B
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 string Interactions { get; set; }
|
||
|
|
||
|
[Required]
|
||
|
public long CreatedAt { get; set; }
|
||
|
|
||
|
[Required]
|
||
|
public string Board { get; set; }
|
||
|
|
||
|
public List<CommentData> Comments { get; set; }
|
||
|
}
|