Files
Govor/Govor.Domain/Models/Invitation.cs
T
Artemy 3ec61fa2c0 Stable server
was added removing messages
many fixes bugs and moving to result pattern from throwing exceptions
2026-08-22 19:28:42 +07:00

29 lines
981 B
C#

using Govor.Domain.Models.Users;
namespace Govor.Domain.Models;
public class Invitation
{
public Guid Id { get; set; }
public bool IsAdmin { get; set; }
public bool IsActive { get; set; } = true;
public string Code { get; set; }
public string Description { get; set; }
public DateTime DateCreated { get; set; }
public DateTime EndDate { get; set; }
public int MaxParticipants { get; set; }
public int Participants { get; set; } = 0;
public List<User> Users { get; set; } = new List<User>();
public override bool Equals(object? obj)
{
var invitation = obj as Invitation ?? throw new InvalidCastException();
return Id == invitation.Id &&
IsAdmin == invitation.IsAdmin &&
Description == invitation.Description &&
DateCreated == invitation.DateCreated &&
EndDate == invitation.EndDate &&
MaxParticipants == invitation.MaxParticipants;
}
}