72 lines
1.3 KiB
C#
72 lines
1.3 KiB
C#
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;
|
|
}
|
|
}
|