using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace DAL.Domain { public class Post { [Key] public int PostId { get; set; } [MaxLength(length: 128)] [MinLength(length: 1)] public string Title { get; set; } [MaxLength(length: 1024)] [MinLength(length: 1)] public string Body { get; set; } public DateTime CreationTime { get; set; } [MaxLength(length: 128)] [MinLength(length: 1)] public string Author { get; set; } public int ForumId { get; set; } } }