yavsc/Yavsc.Api/Model/Identity/ApplicationUser.cs

37 lines
1.2 KiB
C#
Raw Normal View History

2016-05-17 18:22:18 +02:00
using System.Collections.Generic;
using Microsoft.AspNet.Identity.EntityFramework;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
2016-07-19 15:45:26 +02:00
using Yavsc.Models.Identity;
2016-05-17 18:22:18 +02:00
namespace Yavsc.Models
{
2016-07-20 13:52:38 +02:00
public class ApplicationUser : IdentityUser, IApplicationUser
2016-05-17 18:22:18 +02:00
{
[Display(Name="AccountBalance")]
2016-07-20 13:52:38 +02:00
public virtual IAccountBalance AccountBalance { get; set; }
2016-05-17 18:22:18 +02:00
[InverseProperty("Author")]
2016-07-20 13:52:38 +02:00
public virtual IList<IBlog> Posts { get; set; }
2016-05-17 18:22:18 +02:00
[InverseProperty("Owner")]
2016-07-20 13:52:38 +02:00
public virtual IList<IContact> Book { get; set; }
2016-05-17 18:22:18 +02:00
2016-05-30 13:54:52 +02:00
[InverseProperty("DeviceOwner")]
2016-07-20 13:52:38 +02:00
public virtual IList<IGoogleCloudMobileDeclaration> Devices { get; set; }
2016-05-30 13:54:52 +02:00
2016-05-17 18:22:18 +02:00
[InverseProperty("Owner")]
2016-07-20 13:52:38 +02:00
public virtual IList<ICircle> Circles { get; set; }
public virtual ILocation PostalAddress { get; set; }
2016-05-17 18:22:18 +02:00
public string DedicatedGoogleCalendar { get; set; }
public override string ToString() {
return this.Id+" "+this.AccountBalance?.Credits.ToString()+this.Email+" "+this.UserName+" $"+this.AccountBalance?.Credits.ToString();
}
}
}