using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; using ServerCore; using ServerBase; using META_ID = System.UInt32; using USER_GUID = System.String; using META_TYPE = System.String; namespace ServerCommon.BusinessLogDomain { public class UserCreateLogInfo : ILogInvoker.IInfo { [JsonProperty] public USER_GUID UserGuid { get; set; } = string.Empty; [JsonProperty] public string UserPK { get; set; } = string.Empty; [JsonProperty] public string UserSK { get; set; } = string.Empty; [JsonProperty] public AccountCreationType AccountCreationType { get; set; } = AccountCreationType.None; [JsonProperty] public META_TYPE UserCreationMetaType { get; set; } = string.Empty; [JsonProperty] public META_ID UserCreateMetaId { get; set; } = 0; [JsonProperty] public string UserNickname { get; set; } = string.Empty; [JsonProperty] public DateTime CreatedTime { get; set; } = DateTimeHelper.MinTime; //===================================================================================== // 로그 생성용 객체 정의 //===================================================================================== public UserCreateLogInfo() : base() { } public void setInfo(UserCreateLogInfo logInfo) { ArgumentNullException.ThrowIfNull(logInfo, $"logInfo is null !!!"); UserGuid = logInfo.UserGuid; UserPK = logInfo.UserPK; UserSK = logInfo.UserSK; AccountCreationType = logInfo.AccountCreationType; UserCreationMetaType = logInfo.UserCreationMetaType; UserCreateMetaId = logInfo.UserCreateMetaId; UserNickname = logInfo.UserNickname; CreatedTime = logInfo.CreatedTime; } //===================================================================================== // 로그 출력용 객체 정의 //===================================================================================== public UserCreateLogInfo(ILogInvoker parent, DateTime processTime, UserCreateLogInfo logInfo) : base(parent) { if (null != logInfo) { setInfo(logInfo); CreatedTime = processTime; } } //===================================================================================== // 로그 설정용 함수 //===================================================================================== public void setLogProperty( USER_GUID userGuid , string userPK, string userSK , AccountCreationType accountCreationType , META_TYPE userCreationMetaType , META_ID userCreateMetaId , string userNickname , DateTime createdTime ) { UserGuid = userGuid; UserPK = userPK; UserSK = userSK; AccountCreationType = accountCreationType; UserCreationMetaType = userCreationMetaType; UserCreateMetaId = userCreateMetaId; UserNickname = userNickname; CreatedTime = createdTime; } } }