97 lines
3.2 KiB
C#
97 lines
3.2 KiB
C#
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 GameLogInOutLogInfo : 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 Otp { get; set; } = string.Empty;
|
|
[JsonProperty]
|
|
public string Ip { get; set; } = string.Empty;
|
|
[JsonProperty]
|
|
public LanguageType LanguageType { get; set; } = LanguageType.None;
|
|
[JsonProperty]
|
|
public string FromServerName { get; set; } = string.Empty;
|
|
[JsonProperty]
|
|
public string ToServerName { get; set; } = string.Empty;
|
|
[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 GameLogInOutLogInfo()
|
|
: base()
|
|
{ }
|
|
|
|
public void setInfo(GameLogInOutLogInfo logInfo)
|
|
{
|
|
ArgumentNullReferenceCheckHelper.throwIfNull(logInfo, () => "logInfo is null !!!");
|
|
|
|
AccountId = logInfo.AccountId;
|
|
AccountIdString = logInfo.AccountIdString;
|
|
UserGuid = logInfo.UserGuid;
|
|
Otp = logInfo.Otp;
|
|
Ip = logInfo.Ip;
|
|
LanguageType = logInfo.LanguageType;
|
|
FromServerName = logInfo.FromServerName;
|
|
ToServerName = logInfo.ToServerName;
|
|
LoginFailureReasonType = logInfo.LoginFailureReasonType;
|
|
LoginFailureDetailType = logInfo.LoginFailureDetailType;
|
|
LogoutReasonType = logInfo.LogoutReasonType;
|
|
LoginTime = logInfo.LoginTime;
|
|
LogoutTime = logInfo.LogoutTime;
|
|
}
|
|
|
|
//=====================================================================================
|
|
// 로그 출력용 객체 정의
|
|
//=====================================================================================
|
|
public GameLogInOutLogInfo(ILogInvoker parent, DateTime processTime, GameLogInOutLogInfo logInfo)
|
|
: base(parent)
|
|
{
|
|
setInfo(logInfo);
|
|
|
|
if (parent.getLogActionType() == LogActionType.LoginToGame.ToString())
|
|
{
|
|
LoginTime = processTime;
|
|
}
|
|
else if (parent.getLogActionType() == LogActionType.UserLogout.ToString())
|
|
{
|
|
LogoutTime = processTime;
|
|
}
|
|
}
|
|
}
|