This commit is contained in:
Paul Schneider 2017-01-20 14:20:44 +01:00
commit 23dc3c3f19
11 changed files with 1770 additions and 91 deletions

View file

@ -0,0 +1,20 @@
namespace Yavsc.Models.Access
{
using System.ComponentModel.DataAnnotations.Schema;
using Models.Relationship;
using Newtonsoft.Json;
public class CircleAuthorizationToBlogPost
{
public long CircleId { get; set; }
public long BlogPostId { get; set; }
[JsonIgnore]
[ForeignKey("BlogPostId")]
public virtual Blog Post { get; set; }
[JsonIgnore]
[ForeignKey("CircleId")]
public virtual Circle Allowed { get; set; }
}
}

View file

@ -1,7 +1,9 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using Yavsc.Models.Access;
namespace Yavsc.Models
{
@ -39,5 +41,8 @@ namespace Yavsc.Models
{
get; set;
}
[InverseProperty("Post")]
public virtual List<CircleAuthorizationToBlogPost> ACL { get; set; }
}
}