127 lines
3.0 KiB
C#
127 lines
3.0 KiB
C#
using System;
|
||
using System.Collections.Generic;
|
||
using _0_Framework.Domain;
|
||
using AccountManagement.Domain.PmDomains.PmRoleUserAgg;
|
||
|
||
|
||
namespace AccountManagement.Domain.PmDomains.PmUserAgg;
|
||
|
||
/// <summary>
|
||
/// کاربر
|
||
/// </summary>
|
||
public class PmUser : EntityBase
|
||
{
|
||
/// <summary>
|
||
/// ایجاد
|
||
/// </summary>
|
||
/// <param name="fullName"></param>
|
||
/// <param name="userName"></param>
|
||
/// <param name="password"></param>
|
||
/// <param name="mobile"></param>
|
||
/// <param name="email"></param>
|
||
/// <param name="accountId"></param>
|
||
/// <param name="roles"></param>
|
||
public PmUser(string fullName, string userName, string password, string mobile, string email, long? accountId, List<PmRoleUser> roles)
|
||
{
|
||
FullName = fullName;
|
||
UserName = userName;
|
||
Password = password;
|
||
Mobile = mobile;
|
||
Email = email;
|
||
IsActive = true;
|
||
AccountId = accountId;
|
||
RoleUser = roles;
|
||
}
|
||
|
||
protected PmUser()
|
||
{
|
||
|
||
}
|
||
/// <summary>
|
||
/// نام و نام خانوادگی
|
||
/// </summary>
|
||
public string FullName { get; private set; }
|
||
|
||
/// <summary>
|
||
/// نام کاربری
|
||
/// </summary>
|
||
public string UserName { get; private set; }
|
||
|
||
/// <summary>
|
||
/// گذرواژه
|
||
/// </summary>
|
||
public string Password { get; private set; }
|
||
|
||
/// <summary>
|
||
/// مسیر عکس پروفایل
|
||
/// </summary>
|
||
public string ProfilePhotoPath { get; private set; }
|
||
|
||
/// <summary>
|
||
/// شماره موبایل
|
||
/// </summary>
|
||
public string Mobile { get; set; }
|
||
|
||
/// <summary>
|
||
/// ایمیل
|
||
/// </summary>
|
||
public string Email { get; private set; }
|
||
|
||
/// <summary>
|
||
/// فعال/غیر فعال بودن یوزر
|
||
/// </summary>
|
||
public bool IsActive { get; private set; }
|
||
|
||
|
||
/// <summary>
|
||
/// کد یکبارمصرف ورود
|
||
/// </summary>
|
||
public string VerifyCode { get; private set; }
|
||
|
||
/// <summary>
|
||
/// آی دی کاربر در گزارشگیر
|
||
/// </summary>
|
||
public long? AccountId { get; private set; }
|
||
|
||
|
||
/// <summary>
|
||
/// لیست پرمیشن کد ها
|
||
/// </summary>
|
||
public List<PmRoleUser> RoleUser { get; private set; }
|
||
|
||
|
||
/// <summary>
|
||
/// آپدیت کاربر
|
||
/// </summary>
|
||
/// <param name="fullName"></param>
|
||
/// <param name="userName"></param>
|
||
/// <param name="mobile"></param>
|
||
/// <param name="roles"></param>
|
||
/// <param name="isActive"></param>
|
||
public void Edit(string fullName, string userName, string mobile, List<PmRoleUser> roles, bool isActive)
|
||
{
|
||
FullName = fullName;
|
||
UserName = userName;
|
||
Mobile = mobile;
|
||
RoleUser = roles;
|
||
IsActive = isActive;
|
||
}
|
||
|
||
/// <summary>
|
||
/// غیرفعال سازی
|
||
/// </summary>
|
||
public void DeActive()
|
||
{
|
||
IsActive = false;
|
||
}
|
||
|
||
/// <summary>
|
||
/// فعال سازی
|
||
/// </summary>
|
||
public void ReActive()
|
||
{
|
||
IsActive = true;
|
||
}
|
||
|
||
|
||
} |