OnlineSalesAutoCrop/Api/OnlineSalesAutoCrop.CoreAPI.Models/Responses/Systems/UserResponse.cs

145 lines
4.2 KiB
C#
Raw Normal View History

2026-06-14 12:46:29 +06:00
using OnlineSalesAutoCrop.CoreAPI.Models.Objects.Systems;
using System;
using System.Collections.Generic;
namespace OnlineSalesAutoCrop.CoreAPI.Models.Responses.Systems
{
public class FindAccountResponse : BooleanResponse
{
public int UserId { get; set; }
public string PhoneNo { get; set; }
public string EmailAddress { get; set; }
public string PhoneNoMasked { get; set; }
public string EmailAddressMasked { get; set; }
}
public class LoginResponse : ResponseBase1
{
public int Id { get; private set; }
public EnumLoginStatus LoginStatus { get; set; }
public string LoginId { get; set; }
public string UserName { get; set; }
public bool ValidUser { get; set; }
public bool AuthRequiredAtLogin { get; set; }
public EnumAuthenticationMethod AuthMethod { get; set; }
public string AuthenticationToken { get; set; }
public bool PwdChangeRequired { get; set; }
public DateTime? Expires { get; set; }
public DateTime SystemDate { get; set; }
public string LoginTime { get; set; }
public DateTime? LogoutTime { get; private set; }
public int NotificationCount { get; private set; }
2026-08-09 18:20:12 +06:00
public List<string> ModuleIds { get; set; } = [];
2026-06-14 12:46:29 +06:00
2026-08-09 18:20:12 +06:00
public string RefreshToken { get;set; }
public UserPlatFormType? UserPlatFormType { get; set; }
public UserRoleTypeEnum? UserRoleType { get; set; }
public string? EmployeeNumber { get; set; }
public void Map(User source)
2026-06-14 12:46:29 +06:00
{
Id = source.UserId;
2026-06-14 12:46:29 +06:00
LoginId = source.LoginId;
UserName = source.UserName;
2026-08-09 18:20:12 +06:00
ModuleIds = source.ModuleIds;
2026-06-14 12:46:29 +06:00
LogoutTime = source.LogoutTime;
LoginStatus = source.LoginStatus;
2026-08-09 18:20:12 +06:00
UserPlatFormType = source.UserPlatFormType;
UserRoleType = source.UserRoleType;
EmployeeNumber = source.EmployeeNumber;
}
2026-06-14 12:46:29 +06:00
}
public class MenuResponse
{
public MenuItem Item { get; set; }
}
public class UserProfileBase : ResponseBase
{
public int UserId { get; set; }
public string LoginId { get; set; }
public string EmployeeCode { get; set; }
public string UserName { get; set; }
public string Designation { get; set; }
public string MobileNo { get; set; }
public string EmailAddress { get; set; }
}
public class UserGetResponse : UserProfileBase
{
public bool IsLocked { get; set; }
public bool NeverExpire { get; set; }
public EnumStatus Status { get; set; }
public short SeqId { get; set; }
public bool CanUseAttendanceSystem { get; set; }
public bool ViewToAll { get; set; }
public bool AuthRequiredAtLogin { get; set; }
public EnumAuthenticationMethod AuthMethod { get; set; }
public EnumAccessStatus AccessStatus { get; set; }
public bool DbOnStartup { get; set; }
public bool DisallowMultiLogin { get; set; }
public List<int> GroupIds { get; set; } = [];
}
public class UserProfileResponse : UserProfileBase
{
public bool HasAIApiKey { get; set; }
public bool HasPayslipPath { get; set; }
public string Address { get; set; }
public string ContactNo { get; set; }
public DateTime? NextPwdDate { get; set; }
public DateTime? PwdLastChangedTime { get; set; }
public List<LoginHistory> LoginHistories { get; set; }
}
public class UserForceLogoutResponse : ResponseBase
{
public List<UserForceLogout> Value { get; set; } = [];
}
public class UserAttributesResponse : ResponseBase
{
public int UserId { get; set; }
public string LoginId { get; set; }
public List<string> UkIds { get; set; }
public bool HasSetup { get; set; }
}
public class AccessLogResponse : ResponseBase
{
public List<AccessLog> Value { get; set; }
}
public class UserBasicInfoResponse : ResponseBase
{
public List<UserBasicInfo> Value { get; set; } = [];
}
public class UserAuthorizeLimitResponse : ResponseBase
{
public string LoginId { get; set; }
public decimal Value { get; set; }
}
2026-08-10 18:13:54 +06:00
public class BulkPasswordUploadItem
{
public int RowNo { get; set; }
public int UserId { get; set; }
public string EmployeeCode { get; set; }
public string LoginId { get; set; }
public bool Updated { get; set; }
public string Message { get; set; }
}
public class BulkPasswordUploadResponse : ResponseBase
{
public int TotalRows { get; set; }
public int SuccessCount { get; set; }
public int FailedCount { get; set; }
public List<BulkPasswordUploadItem> Items { get; set; } = [];
}
2026-06-14 12:46:29 +06:00
}