This commit is contained in:
2025-12-23 00:07:55 +03:30
parent f8e07ed23b
commit 23e68de1ef
3 changed files with 166 additions and 77 deletions
+30 -13
View File
@@ -6,11 +6,13 @@ using Microsoft.AspNetCore.Identity;
using xIdentityModels.Constants;
using xIdentityModels.Navigations;
namespace xIdentityModels {
namespace xIdentityModels
{
/// <summary>
/// represnt a User of System
/// </summary>
public partial class XUser : IdentityUser {
public partial class XUser : IdentityUser
{
//
#region Properties ...
/// <summary>
@@ -18,14 +20,14 @@ namespace xIdentityModels {
/// </summary>
/// <value>user's FirstName</value>
[Required]
[StringLength (50)]
[StringLength(50)]
public string FirstName { get; set; }
/// <summary>
/// LastName
/// </summary>
/// <value>user's LastName</value>
[Required]
[StringLength (100)]
[StringLength(100)]
public string LastName { get; set; }
/// <summary>
/// User is Enabled or not
@@ -71,6 +73,21 @@ namespace xIdentityModels {
/// <value>user's Gender</value>
[Required]
public XGender Gender { get; set; }
/// <summary>
/// User Biography ...
/// </summary>
/// <value></value>
public string Bio { get; set; }
/// <summary>
/// User Bio Cover Image ...
/// </summary>
/// <value></value>
public string CoverImage { get; set; }
/// <summary>
/// Can Discover User ...
/// </summary>
/// <value></value>
public bool OpenToSearch { get; set; }
#endregion
//
@@ -80,34 +97,34 @@ namespace xIdentityModels {
/// </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")]
[InverseProperty("User")]
public virtual ICollection<XDevice> Devices { get; set; } = new HashSet<XDevice>();
/// <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> ();
[InverseProperty("User")]
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> ();
[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> ();
[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>> ();
public virtual ICollection<IdentityUserRole<string>> Roles { get; set; } = new HashSet<IdentityUserRole<string>>();
#endregion
}
}