From 6ced7f488450777ddc0920f7f8b755987e96b916 Mon Sep 17 00:00:00 2001 From: dibakor Date: Sun, 14 Jun 2026 18:53:06 +0600 Subject: [PATCH] remove some unwanted code --- .../Objects/Systems/RefreshToken.cs | 16 +++++ .../Objects/Systems/User.cs | 67 +------------------ 2 files changed, 17 insertions(+), 66 deletions(-) create mode 100644 Api/OnlineSalesAutoCrop.CoreAPI.Models/Objects/Systems/RefreshToken.cs diff --git a/Api/OnlineSalesAutoCrop.CoreAPI.Models/Objects/Systems/RefreshToken.cs b/Api/OnlineSalesAutoCrop.CoreAPI.Models/Objects/Systems/RefreshToken.cs new file mode 100644 index 0000000..c94a133 --- /dev/null +++ b/Api/OnlineSalesAutoCrop.CoreAPI.Models/Objects/Systems/RefreshToken.cs @@ -0,0 +1,16 @@ +using System; + +namespace OnlineSalesAutoCrop.CoreAPI.Models.Objects.Systems; + +public class RefreshToken +{ + public int Id { get; set; } + public int UserId { get; set; } + public string TokenHash { get; set; } = string.Empty; + public string DeviceInfo { get; set; } = string.Empty; + public string IpAddress { get; set; } = string.Empty; + public DateTime CreatedAt { get; set; } + public DateTime ExpiresAt { get; set; } + public DateTime? RevokedAt { get; set; } + public bool IsActive => RevokedAt == null && ExpiresAt > DateTime.UtcNow; +} diff --git a/Api/OnlineSalesAutoCrop.CoreAPI.Models/Objects/Systems/User.cs b/Api/OnlineSalesAutoCrop.CoreAPI.Models/Objects/Systems/User.cs index dd2b4a0..615923c 100644 --- a/Api/OnlineSalesAutoCrop.CoreAPI.Models/Objects/Systems/User.cs +++ b/Api/OnlineSalesAutoCrop.CoreAPI.Models/Objects/Systems/User.cs @@ -1,6 +1,4 @@ -using OnlineSalesAutoCrop.CoreAPI.Models.Global; -using System; -using System.Collections.Generic; +using System; namespace OnlineSalesAutoCrop.CoreAPI.Models.Objects.Systems { @@ -11,7 +9,6 @@ namespace OnlineSalesAutoCrop.CoreAPI.Models.Objects.Systems public int Id { get; set; } public string LoginId { get; set; } - public int LogId { get; set; } public DateTime? LogoutTime { get; set; } public string UserName { get; set; } public EnumStatus Status { get; set; } @@ -19,17 +16,6 @@ namespace OnlineSalesAutoCrop.CoreAPI.Models.Objects.Systems public bool NeverExpires { get; set; } public string LastPasswords { get; set; } public DateTime? LastPassChgDate { get; set; } - public DateTime? ExpireDate { get; set; } - public DateTime? NextLoginTime { get; set; } - public DateTime SystemDate { get; set; } - public bool DbOnStartup { get; set; } - public bool ViewOwnTaskOnly { get; set; } - public int? EmployeeId { get; set; } - public string EmployeeCode { get; set; } - public EnumLoginStatus LoginStatus { get; set; } - public EnumAuthenticationMethod AuthMethod { get; set; } - public bool AuthRequiredAtLogin { get; set; } - public List ModuleIds { get; set; } public string EmailAddress { get; set; } public string AuthKey { get; set; } public string AuthValue { get; set; } @@ -39,17 +25,6 @@ namespace OnlineSalesAutoCrop.CoreAPI.Models.Objects.Systems public string SchemeName { get; set; } public string MenuLayout { get; set; } public bool IsLocked { get; set; } - public DateTime MinReportDate { get; set; } - public string AppId { get; set; } - public bool DisallowMultiLogin { get; set; } - public bool BatchEnabled { get; set; } - public int BmProcessId { get; set; } - public int PrProcessId { get; set; } - public int IdleTime { get; set; } - public int PingTime { get; set; } - public int TimeoutTime { get; set; } - public int NotificationCount { get; set; } - public List TeamSpaceIds { get; set; } } public class LoginHistory @@ -71,32 +46,6 @@ namespace OnlineSalesAutoCrop.CoreAPI.Models.Objects.Systems public string LoginStatus { get; set; } } - public class DashboardItem - { - public string DivStyleCss { get; set; } - public string Title { get; set; } - public string TitleCss { get; set; } - public string Value { get; set; } - public string ValueCss { get; set; } - public int Id { get; set; } - public string Href { get; set; } - } - - public class Dashboard2Item - { - public string Title { get; set; } - public decimal Value { get; set; } - public string TitleStyle { get; set; } - public string ValueStyle { get; set; } - public string ValueFormat { get; set; } - } - - public class Dashboard2Data - { - public string GroupName { get; set; } - public List Items { get; set; } - } - public class UserForceLogout { public int UserId { get; set; } @@ -104,20 +53,6 @@ namespace OnlineSalesAutoCrop.CoreAPI.Models.Objects.Systems public string UserName { get; set; } } - public class UserSearch : UserForceLogout - { - public string Designation { get; set; } - public string MobileNo { get; set; } - public string EmailAddress { get; set; } - public EnumStatus Status { get; set; } - public short SeqId { get; set; } - public bool CanUseAttendanceSystem { get; set; } - public bool IsLocked { get; set; } - public string AuthId { get; set; } - - public string StatusDetail => Status.GetDescription(); - } - public class UserBasicInfo { public int UserId { get; set; }