presence/Demo/Domain/Models/Group.cs

46 lines
968 B
C#
Raw Normal View History

2024-10-21 12:42:00 +00:00
using System;
namespace Demo.Domain.Models
{
public class Group
{
public int Id { get; set; }
public string Name { get; set; }
public Group() { }
public Group(int id, string name)
{
Id = id;
Name = name;
}
public override bool Equals(object obj)
{
return obj is Group group &&
Id == group.Id &&
Name == group.Name;
}
public override int GetHashCode()
{
return HashCode.Combine(Id, Name);
}
internal Data.LocalData.Entity.Group ToEntity()
{
throw new NotImplementedException();
}
public static bool operator ==(Group left, Group right)
{
return left.Equals(right);
}
public static bool operator !=(Group left, Group right)
{
return !(left == right);
}
}
}