Fogo
This commit is contained in:
parent
1f6e6d5d4f
commit
fdf5ee915e
67 changed files with 48812 additions and 37055 deletions
|
|
@ -8,19 +8,19 @@ using Yavsc.Interfaces;
|
|||
|
||||
namespace Yavsc.Models.Blog
|
||||
{
|
||||
public class Comment : IComment<long>, IBaseTrackedEntity
|
||||
public class Comment : IComment<long>, ITrackedEntity
|
||||
{
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
|
||||
[YaStringLength(1024)]
|
||||
[YaStringLength(1024)]
|
||||
public string Content { get; set; }
|
||||
|
||||
[ForeignKeyAttribute("PostId")][JsonIgnore]
|
||||
[ForeignKeyAttribute(nameof(ReceiverId))][JsonIgnore]
|
||||
public virtual BlogPost Post { get; set; }
|
||||
|
||||
[Required]
|
||||
public long PostId { get; set; }
|
||||
public long ReceiverId { get; set; }
|
||||
public bool Visible { get; set; }
|
||||
|
||||
[ForeignKeyAttribute("AuthorId")][JsonIgnore]
|
||||
|
|
@ -34,10 +34,8 @@ namespace Yavsc.Models.Blog
|
|||
get; set;
|
||||
}
|
||||
|
||||
public string UserCreated
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
public string UserCreated { get => AuthorId; set => AuthorId=value; }
|
||||
|
||||
public DateTime DateModified
|
||||
{
|
||||
get; set;
|
||||
|
|
@ -53,19 +51,10 @@ namespace Yavsc.Models.Blog
|
|||
get; set;
|
||||
}
|
||||
|
||||
public long GetReceiverId()
|
||||
{
|
||||
return PostId;
|
||||
}
|
||||
public void SetReceiverId(long rid)
|
||||
{
|
||||
PostId = rid;
|
||||
}
|
||||
|
||||
public long? ParentId { get; set; }
|
||||
|
||||
[ForeignKeyAttribute("ParentId")]
|
||||
public virtual Comment Parent { get; set; }
|
||||
public virtual Comment? Parent { get; set; }
|
||||
|
||||
[InversePropertyAttribute("Parent")]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue