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 int LogId { get; set; } public DateTime? LogoutTime { get; private set; } public string MenuLayout { get; set; } public string ThemeName { get; set; } public string SchemeName { get; set; } public bool DbOnStartup { get; set; } public bool ViewOwnTaskOnly { get; private set; } public int? EmployeeId { get; private set; } public int NotificationCount { get; private set; } public int IdleTime { get; set; } public int PingTime { get; set; } public int TimeoutTime { get; set; } public bool BatchEnabled { get; private set; } public int BmProcessId { get; private set; } public int PrProcessId { get; private set; } public string IdsValue { get; set; } //public List ModuleIds { get; set; } = []; public void Map(User source) { Id = source.Id; LogId = source.LogId; LoginId = source.LoginId; IdleTime = source.IdleTime; UserName = source.UserName; PingTime = source.PingTime; ThemeName = source.ThemeName; //ModuleIds = source.ModuleIds; LogoutTime = source.LogoutTime; SchemeName = source.SchemeName; AuthMethod = source.AuthMethod; MenuLayout = source.MenuLayout; SystemDate = source.SystemDate; EmployeeId = source.EmployeeId; LoginStatus = source.LoginStatus; DbOnStartup = source.DbOnStartup; TimeoutTime = source.TimeoutTime; BmProcessId = source.BmProcessId; PrProcessId = source.PrProcessId; BatchEnabled = source.BatchEnabled; ViewOwnTaskOnly = source.ViewOwnTaskOnly; NotificationCount = source.NotificationCount; AuthRequiredAtLogin = source.AuthRequiredAtLogin; IdsValue = Newtonsoft.Json.JsonConvert.SerializeObject(source.ModuleIds); } } 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 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 LoginHistories { get; set; } } public class DashboardDataResponse : ResponseBase { public List GroupData { get; set; } = []; public Dashboard2Data Group1Data { get; set; } public Dashboard2Data Group2Data { get; set; } public Dashboard2Data Group3Data { get; set; } public Dashboard2Data Group4Data { get; set; } } public class UserSearchResponse : TotalRowsResponseBase { public List Value { get; set; } = []; } public class UserForceLogoutResponse : ResponseBase { public List Value { get; set; } = []; } public class UserAttributesResponse : ResponseBase { public int UserId { get; set; } public string LoginId { get; set; } public List UkIds { get; set; } public bool HasSetup { get; set; } } public class AccessLogResponse : ResponseBase { public List Value { get; set; } } public class UserBasicInfoResponse : ResponseBase { public List Value { get; set; } = []; } public class UserAuthorizeLimitResponse : ResponseBase { public string LoginId { get; set; } public decimal Value { get; set; } } }