Initial Commit ...
This commit is contained in:
@@ -0,0 +1,113 @@
|
||||
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 {
|
||||
/// <summary>
|
||||
/// represnt a User of System
|
||||
/// </summary>
|
||||
public partial class XUser : IdentityUser {
|
||||
//
|
||||
#region Properties ...
|
||||
/// <summary>
|
||||
/// FirstName
|
||||
/// </summary>
|
||||
/// <value>user's FirstName</value>
|
||||
[Required]
|
||||
[StringLength (50)]
|
||||
public string FirstName { get; set; }
|
||||
/// <summary>
|
||||
/// LastName
|
||||
/// </summary>
|
||||
/// <value>user's LastName</value>
|
||||
[Required]
|
||||
[StringLength (100)]
|
||||
public string LastName { get; set; }
|
||||
/// <summary>
|
||||
/// User is Enabled or not
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// system was restrict Disabled Users access to Many Resources
|
||||
/// </remarks>
|
||||
/// <value>boolean value represent User is Enable or not</value>
|
||||
public bool IsEnable { get; set; }
|
||||
/// <summary>
|
||||
/// User is Banned or not
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// system was reject Banned Users access to Almost all Resources
|
||||
/// </remarks>
|
||||
/// <value>boolean value represent User is Banned or not</value>
|
||||
public bool IsBanned { get; set; }
|
||||
/// <summary>
|
||||
/// DateOfBirth
|
||||
/// </summary>
|
||||
/// <value>user's DateOfBirth</value>
|
||||
[Required]
|
||||
public DateTime DateOfBirth { get; set; }
|
||||
/// <summary>
|
||||
/// CreationDate
|
||||
/// </summary>
|
||||
/// <value>user's Creation/Registration Date</value>
|
||||
[Required]
|
||||
public DateTime CreationDate { get; set; }
|
||||
/// <summary>
|
||||
/// LastLogin
|
||||
/// </summary>
|
||||
/// <value>user's Last Successfull Login Date</value>
|
||||
public DateTime? LastLogin { get; set; }
|
||||
/// <summary>
|
||||
/// ProfileImage/Avatar
|
||||
/// </summary>
|
||||
/// <value>user's current Avatar</value>
|
||||
public string Avatar { get; set; }
|
||||
/// <summary>
|
||||
/// Gender
|
||||
/// </summary>
|
||||
/// <value>user's Gender</value>
|
||||
[Required]
|
||||
public XGender Gender { get; set; }
|
||||
#endregion
|
||||
|
||||
//
|
||||
#region Navigation Properties ...
|
||||
/// <summary>
|
||||
/// User's Devices
|
||||
/// </summary>
|
||||
/// <typeparam name="XDevice"><see>XDevice</see></typeparam>
|
||||
/// <returns>a Collection of all assigned Devices to User</returns>
|
||||
[InverseProperty ("User")]
|
||||
public virtual ICollection<XDevice> Devices { get; set; } = new HashSet<XDevice> ();
|
||||
[InverseProperty ("User")]
|
||||
/// <summary>
|
||||
/// User's Avatars
|
||||
/// </summary>
|
||||
/// <typeparam name="XProfileImage"><see>XProfileImage</see></typeparam>
|
||||
/// <returns>a Collection of all assigned Avatars to User</returns>
|
||||
public virtual ICollection<XProfileImage> Avatars { get; set; } = new HashSet<XProfileImage> ();
|
||||
/// <summary>
|
||||
/// User's Followers
|
||||
/// </summary>
|
||||
/// <typeparam name="XFriendshipFollower"><see>XFriendshipFollower</see></typeparam>
|
||||
/// <returns>a Collection of all User's Followers</returns>
|
||||
[InverseProperty ("User")]
|
||||
public virtual ICollection<XFriendshipFollower> Followers { get; set; } = new HashSet<XFriendshipFollower> ();
|
||||
/// <summary>
|
||||
/// User's Followings
|
||||
/// </summary>
|
||||
/// <typeparam name="XFriendshipFollowing"><see>XFriendshipFollowing</see></typeparam>
|
||||
/// <returns>a Collection of all User's Followings</returns>
|
||||
[InverseProperty ("User")]
|
||||
public virtual ICollection<XFriendshipFollowing> Followings { get; set; } = new HashSet<XFriendshipFollowing> ();
|
||||
/// <summary>
|
||||
/// User's Roles
|
||||
/// </summary>
|
||||
/// <returns>a Collection of all User's Roles in System</returns>
|
||||
public virtual ICollection<IdentityUserRole<string>> Roles { get; set; } = new HashSet<IdentityUserRole<string>> ();
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user