using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; using ServerCore; using ServerBase; using ACCOUNT_ID = System.String; using ACCOUNT_ID_STRING = System.String; using USER_GUID = System.String; namespace ServerCommon.BusinessLogDomain; public class AuthLoginOutLogInfo : ILogInvoker.IInfo { [JsonProperty] public ACCOUNT_ID AccountId { get; set; } = string.Empty; [JsonProperty] public ACCOUNT_ID_STRING AccountIdString { get; set; } = string.Empty; [JsonProperty] public USER_GUID UserGuid { get; set; } = string.Empty; [JsonProperty] public string AuthWebAccessToken { get; set; } = string.Empty; [JsonProperty] public DeviceType DeviceType { get; set; } = DeviceType.None; [JsonProperty] public string DeviceDetailType { get; set; } = string.Empty; [JsonProperty] public PlatformType PlatformType { get; set; } = PlatformType.None; [JsonProperty] public string PlatformDetailType { get; set; } = string.Empty; [JsonProperty] public OsType OsType { get; set; } = OsType.None; [JsonProperty] public string OsDetailType { get; set; } = string.Empty; [JsonProperty] public LanguageType LanguageType { get; set; } = LanguageType.None; [JsonProperty] public string Ip { get; set; } = string.Empty; [JsonProperty] public LoginMethodType LoginMethodType { get; set; } = LoginMethodType.None; [JsonProperty] public LoginFailureReasonType LoginFailureReasonType { get; set; } = LoginFailureReasonType.None; [JsonProperty] public string LoginFailureDetailType { get; set; } = string.Empty; [JsonProperty] public LogoutReasonType LogoutReasonType { get; set; } = LogoutReasonType.None; [JsonProperty] public DateTime LoginTime { get; set; } = DateTimeHelper.MinTime; [JsonProperty] public DateTime LogoutTime { get; set; } = DateTimeHelper.MinTime; //===================================================================================== // 로그 생성용 객체 정의 //===================================================================================== public AuthLoginOutLogInfo() : base() { } public void setInfo(AuthLoginOutLogInfo logInfo) { AccountId = logInfo.AccountId; AccountIdString = logInfo.AccountIdString; UserGuid = logInfo.UserGuid; AuthWebAccessToken = logInfo.AuthWebAccessToken; DeviceType = logInfo.DeviceType; DeviceDetailType = logInfo.DeviceDetailType; PlatformType = logInfo.PlatformType; PlatformDetailType = logInfo.PlatformDetailType; OsType = logInfo.OsType; OsDetailType = logInfo.OsDetailType; LanguageType = logInfo.LanguageType; Ip = logInfo.Ip; LoginMethodType = logInfo.LoginMethodType; LoginFailureReasonType = logInfo.LoginFailureReasonType; LoginFailureDetailType = logInfo.LoginFailureDetailType; LoginTime = logInfo.LoginTime; LogoutReasonType = logInfo.LogoutReasonType; LogoutTime = logInfo.LogoutTime; } //===================================================================================== // 로그 출력용 객체 정의 //===================================================================================== public AuthLoginOutLogInfo(ILogInvoker parent, DateTime processTime, AuthLoginOutLogInfo logInfo) : base(parent) { if (null != logInfo) { setInfo(logInfo); if (parent.getLogActionType() == LogActionType.LoginToUserAuth.ToString()) { LoginTime = processTime; } else if (parent.getLogActionType() == LogActionType.UserLogout.ToString()) { LogoutTime = processTime; } } } }