no comment

This commit is contained in:
Paul Schneider 2017-10-04 23:53:47 +02:00
commit 0e49b13965
54 changed files with 6158 additions and 213 deletions

View file

@ -0,0 +1,60 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using Yavsc.Attributes.Validation;
using Yavsc.Interfaces;
namespace Yavsc.Models.Blog
{
public partial class Comment : IComment<long>, IBaseTrackedEntity
{
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
[YaStringLength(1024)]
public string Content { get; set; }
[ForeignKeyAttribute("PostId")][JsonIgnore]
public virtual BlogPost Post { get; set; }
[Required]
public long PostId { get; set; }
public bool Visible { get; set; }
[ForeignKeyAttribute("UserCreated")][JsonIgnore]
public virtual ApplicationUser Author {
get; set;
}
[Required]
public string UserCreated
{
get; set;
}
public DateTime DateModified
{
get; set;
}
public string UserModified
{
get; set;
}
public DateTime DateCreated
{
get; set;
}
public long GetReceiverId()
{
return PostId;
}
public void SetReceiverId(long rid)
{
PostId = rid;
}
}
}