namespace ODMO.Commons.Models.Character
{
public sealed partial class CharacterFriendModel
{
///
/// Unique sequential identifier.
///
public long Id { get; private set; }
///
/// Friend name.
///
public string Name { get; private set; }
///
/// Friend annotation.
///
public string Annotation { get; set; }
///
/// Connection status.
///
public bool Connected { get; private set; }
///
/// Friend character id.
///
public long FriendId { get; private set; }
public long CharacterId { get; private set; }
public CharacterModel? Character { get; private set; }
public CharacterModel? Friend { get; private set; }
public static CharacterFriendModel Create(string name, long tamerId, bool online)
{
var friend = new CharacterFriendModel()
{
Name = name,
Connected = online,
FriendId = tamerId
};
return friend;
}
public void SetTamer(CharacterModel tamer)
{
CharacterId = tamer.Id;
}
public void SetConnected(bool online)
{
Connected = online;
}
}
}