2020-08-09 11:10:33 +02:00
|
|
|
|
using System;
|
2020-08-09 21:44:12 +02:00
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
2020-08-09 11:10:33 +02:00
|
|
|
|
|
2020-08-16 11:03:10 +02:00
|
|
|
|
namespace Giants.DataContract.V1
|
2020-08-08 08:53:35 +02:00
|
|
|
|
{
|
|
|
|
|
public class PlayerInfo
|
|
|
|
|
{
|
2020-08-09 21:44:12 +02:00
|
|
|
|
[Required]
|
2020-08-08 08:53:35 +02:00
|
|
|
|
public int Index { get; set; }
|
|
|
|
|
|
2020-08-09 21:44:12 +02:00
|
|
|
|
[Required]
|
2020-08-08 08:53:35 +02:00
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
2020-08-09 21:44:12 +02:00
|
|
|
|
[Required]
|
2020-08-08 08:53:35 +02:00
|
|
|
|
public int Frags { get; set; }
|
|
|
|
|
|
2020-08-09 21:44:12 +02:00
|
|
|
|
[Required]
|
2020-08-08 08:53:35 +02:00
|
|
|
|
public int Deaths { get; set; }
|
|
|
|
|
|
2020-08-09 21:44:12 +02:00
|
|
|
|
[Required]
|
2020-08-08 08:53:35 +02:00
|
|
|
|
public string TeamName { get; set; }
|
2020-08-09 11:10:33 +02:00
|
|
|
|
|
|
|
|
|
public override bool Equals(object obj)
|
|
|
|
|
{
|
|
|
|
|
return obj is PlayerInfo info &&
|
|
|
|
|
Index == info.Index &&
|
|
|
|
|
Name == info.Name &&
|
|
|
|
|
Frags == info.Frags &&
|
|
|
|
|
Deaths == info.Deaths &&
|
|
|
|
|
TeamName == info.TeamName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override int GetHashCode()
|
|
|
|
|
{
|
|
|
|
|
return HashCode.Combine(Index, Name, Frags, Deaths, TeamName);
|
|
|
|
|
}
|
2020-08-08 08:53:35 +02:00
|
|
|
|
}
|
|
|
|
|
}
|