using System.Collections.Generic;
using Microsoft.AspNet.Identity.EntityFramework;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Identity;
using Yavsc.Model.Chat;
namespace Yavsc.Models
{
public class ApplicationUser : IdentityUser
{
///
/// Another me, as a byte array.
/// This value points a picture that may be used
/// to sign documents.
///
/// the path to an user's image, relative to it's dir
/// Startup.UserFilesOptions
///
///
[MaxLength(512)]
public string Avatar { get; set; }
[MaxLength(512)]
public string FullName { get; set; }
///
/// WIP Paypal
///
///
[Display(Name="Account balance")]
public virtual AccountBalance AccountBalance { get; set; }
///
/// User's posts
///
///
[InverseProperty("Author")]
public virtual List Posts { get; set; }
///
/// User's contact list
///
///
[InverseProperty("Owner")]
public virtual List Book { get; set; }
///
/// External devices using the API
///
///
[InverseProperty("DeviceOwner")]
public virtual List Devices { get; set; }
[InverseProperty("Owner")]
public virtual List Connections { get; set; }
///
/// User's circles
///
///
[InverseProperty("Owner")]
public virtual List Circles { get; set; }
///
/// Billing postal address
///
///
public virtual Location PostalAddress { get; set; }
///
/// User's Google calendar
///
///
public string DedicatedGoogleCalendar { get; set; }
public override string ToString() {
return this.Id+" "+this.AccountBalance?.Credits.ToString()+this.Email+" "+this.UserName+" $"+this.AccountBalance?.Credits.ToString();
}
}
}