This commit is contained in:
Paul Schneider 2017-02-01 03:53:00 +01:00
commit 03b6447d7c
9 changed files with 1755 additions and 1 deletions

View file

@ -1,5 +1,6 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
namespace Yavsc.Models.Access
{
@ -7,10 +8,14 @@ namespace Yavsc.Models.Access
{
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
[Required]
public string UserId { get; set; }
[Required]
public string OwnerId { get; set; }
[ForeignKey("OwnerId")]
[ForeignKey("OwnerId"),JsonIgnore]
public virtual ApplicationUser Owner { get; set; }
}