using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Microsoft.AspNetCore.Identity; using xIdentityModels.Constants; using xIdentityModels.Navigations; namespace xIdentityModels { /// /// represnt a User of System /// public partial class XUser : IdentityUser { // #region Properties ... /// /// FirstName /// /// user's FirstName [Required] [StringLength(50)] public string FirstName { get; set; } /// /// LastName /// /// user's LastName [Required] [StringLength(100)] public string LastName { get; set; } /// /// User is Enabled or not /// /// /// system was restrict Disabled Users access to Many Resources /// /// boolean value represent User is Enable or not public bool IsEnable { get; set; } /// /// User is Banned or not /// /// /// system was reject Banned Users access to Almost all Resources /// /// boolean value represent User is Banned or not public bool IsBanned { get; set; } /// /// DateOfBirth /// /// user's DateOfBirth [Required] public DateTime DateOfBirth { get; set; } /// /// CreationDate /// /// user's Creation/Registration Date [Required] public DateTime CreationDate { get; set; } /// /// LastLogin /// /// user's Last Successfull Login Date public DateTime? LastLogin { get; set; } /// /// ProfileImage/Avatar /// /// user's current Avatar public string Avatar { get; set; } /// /// Gender /// /// user's Gender [Required] public XGender Gender { get; set; } /// /// User Biography ... /// /// public string Bio { get; set; } /// /// User Bio Cover Image ... /// /// public string CoverImage { get; set; } /// /// Can Discover User ... /// /// public bool OpenToSearch { get; set; } #endregion // #region Navigation Properties ... /// /// User's Devices /// /// XDevice /// a Collection of all assigned Devices to User [InverseProperty("User")] public virtual ICollection Devices { get; set; } = new HashSet(); /// /// User's Avatars /// /// XProfileImage /// a Collection of all assigned Avatars to User [InverseProperty("User")] public virtual ICollection Avatars { get; set; } = new HashSet(); /// /// User's Followers /// /// XFriendshipFollower /// a Collection of all User's Followers [InverseProperty("User")] public virtual ICollection Followers { get; set; } = new HashSet(); /// /// User's Followings /// /// XFriendshipFollowing /// a Collection of all User's Followings [InverseProperty("User")] public virtual ICollection Followings { get; set; } = new HashSet(); /// /// User's Roles /// /// a Collection of all User's Roles in System public virtual ICollection> Roles { get; set; } = new HashSet>(); #endregion } }