You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.1 KiB
53 lines
1.1 KiB
namespace Dto;
|
|
|
|
public class SuccessDto : IEquatable<SuccessDto>
|
|
{
|
|
public int UserId { get; set; }
|
|
public int InquiryId { get; set; }
|
|
public bool IsFinished { get; set; }
|
|
|
|
public SuccessDto()
|
|
{
|
|
}
|
|
|
|
public SuccessDto(int userId, int inquiryId, bool isFinished)
|
|
{
|
|
UserId = userId;
|
|
InquiryId = inquiryId;
|
|
IsFinished = isFinished;
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return $"User :{UserId}\t Enquête : {InquiryId}\t{IsFinished}";
|
|
}
|
|
|
|
public override bool Equals(object right)
|
|
{
|
|
if (object.ReferenceEquals(right, null))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
if (object.ReferenceEquals(this, right))
|
|
{
|
|
return true;
|
|
}
|
|
|
|
if (this.GetType() != right.GetType())
|
|
{
|
|
return false;
|
|
}
|
|
|
|
return this.Equals(right as SuccessDto);
|
|
}
|
|
public bool Equals(SuccessDto other)
|
|
{
|
|
return (this.UserId == other.UserId && this.InquiryId == other.InquiryId);
|
|
}
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
return UserId * InquiryId;
|
|
}
|
|
} |