초기커밋
This commit is contained in:
71
UGQDataAccess/Logs/UgqLogAccount.cs
Normal file
71
UGQDataAccess/Logs/UgqLogAccount.cs
Normal file
@@ -0,0 +1,71 @@
|
||||
using Google.Protobuf;
|
||||
using Google.Protobuf.WellKnownTypes;
|
||||
|
||||
|
||||
using ServerCore;
|
||||
using ServerBase;
|
||||
using ServerCommon;
|
||||
using ServerCommon.BusinessLogDomain;
|
||||
using MetaAssets;
|
||||
|
||||
|
||||
using UGQDatabase.Models;
|
||||
|
||||
|
||||
namespace UGQDataAccess.Logs;
|
||||
|
||||
public class UgqLogAccount : IWithLogActor
|
||||
{
|
||||
string? m_userGuid;
|
||||
string? m_nickname;
|
||||
|
||||
public UgqLogAccount(AccountEntity entity)
|
||||
{
|
||||
m_userGuid = entity.UserGuid;
|
||||
m_nickname = entity.Nickname;
|
||||
}
|
||||
|
||||
public UgqLogAccount(string userGuid)
|
||||
{
|
||||
m_userGuid = userGuid;
|
||||
}
|
||||
|
||||
public UgqLogAccount(string userGuid, string nickname)
|
||||
{
|
||||
m_userGuid = userGuid;
|
||||
m_nickname = nickname;
|
||||
}
|
||||
|
||||
public ILogActor toLogActor()
|
||||
{
|
||||
var log_info = new UgqApiUserActorLog();
|
||||
log_info.initLogInfo(
|
||||
ServerType.UgqApi,
|
||||
m_userGuid ?? string.Empty,
|
||||
m_nickname ?? string.Empty
|
||||
);
|
||||
|
||||
return log_info;
|
||||
}
|
||||
}
|
||||
|
||||
public class UgqLogAdmin : IWithLogActor
|
||||
{
|
||||
string m_username;
|
||||
|
||||
public UgqLogAdmin(AdminAccountEntity entity)
|
||||
{
|
||||
m_username = entity.Username;
|
||||
}
|
||||
|
||||
public ILogActor toLogActor()
|
||||
{
|
||||
var log_info = new UgqApiAdminLog();
|
||||
log_info.initLogInfo(
|
||||
ServerType.UgqApi,
|
||||
m_username
|
||||
);
|
||||
|
||||
return log_info;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user