mirror of
https://github.com/MikuLeaks/KianaBH3.git
synced 2025-12-13 21:34:43 +01:00
Init enter game
This commit is contained in:
28
Common/Database/Client/ClientData.cs
Normal file
28
Common/Database/Client/ClientData.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using Google.Protobuf;
|
||||
using KianaBH.Proto;
|
||||
using SqlSugar;
|
||||
|
||||
namespace KianaBH.Database.Client;
|
||||
|
||||
[SugarTable("client_data")]
|
||||
public class ClientData : BaseDatabaseDataHelper
|
||||
{
|
||||
[SugarColumn(IsJson = true)] public List<ClientDBData> Clients { get; set; } = [];
|
||||
}
|
||||
|
||||
public class ClientDBData
|
||||
{
|
||||
public uint Id { get; set; }
|
||||
public ClientDataType Type { get; set; } = ClientDataType.ClientDataNone;
|
||||
public byte[] Data { get; set; } = Array.Empty<byte>();
|
||||
public Proto.ClientData ToProto()
|
||||
{
|
||||
var proto = new Proto.ClientData
|
||||
{
|
||||
Id = Id,
|
||||
Type = Type,
|
||||
Data = ByteString.CopyFrom(Data)
|
||||
};
|
||||
return proto;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user