59 lines
1.5 KiB
C#
59 lines
1.5 KiB
C#
using ProtoBuf;
|
|
|
|
using System.Collections.Generic;
|
|
using MongoDB.Bson.Serialization.Attributes;
|
|
using Fantasy;
|
|
using Fantasy.Network.Interface;
|
|
using Fantasy.Serialize;
|
|
// ReSharper disable InconsistentNaming
|
|
// ReSharper disable RedundantUsingDirective
|
|
// ReSharper disable RedundantOverriddenMember
|
|
// ReSharper disable PartialTypeWithSinglePart
|
|
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
|
// ReSharper disable MemberCanBePrivate.Global
|
|
// ReSharper disable CheckNamespace
|
|
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
|
|
#pragma warning disable CS8618
|
|
|
|
namespace Fantasy
|
|
{
|
|
/// <summary>
|
|
/// 好友信息
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class FriendInfo : AMessage, IProto
|
|
{
|
|
public static FriendInfo Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<FriendInfo>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
Id = default;
|
|
AddTime = default;
|
|
NickName = default;
|
|
Head = default;
|
|
Level = default;
|
|
Country = default;
|
|
OnlineStatus = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<FriendInfo>(this);
|
|
#endif
|
|
}
|
|
[ProtoMember(1)]
|
|
public long Id { get; set; }
|
|
[ProtoMember(2)]
|
|
public long AddTime { get; set; }
|
|
[ProtoMember(3)]
|
|
public string NickName { get; set; }
|
|
[ProtoMember(4)]
|
|
public string Head { get; set; }
|
|
[ProtoMember(5)]
|
|
public int Level { get; set; }
|
|
[ProtoMember(6)]
|
|
public string Country { get; set; }
|
|
[ProtoMember(7)]
|
|
public int OnlineStatus { get; set; }
|
|
}
|
|
}
|