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.
63 lines
1.2 KiB
63 lines
1.2 KiB
namespace Dto;
|
|
|
|
public class InquiryDTO : IEquatable<InquiryDTO>
|
|
{
|
|
public int Id { get; }
|
|
|
|
public string Title { get; set; }
|
|
|
|
public string Description { get; set; }
|
|
|
|
public bool IsUser { get; set; }
|
|
|
|
public InquiryDto(){}
|
|
public InquiryDto(int id, string title, string description, bool isUser)
|
|
{
|
|
Id = id;
|
|
Title = title;
|
|
Description = description;
|
|
IsUser = isUser;
|
|
}
|
|
|
|
public InquiryDto(string title, string description, bool isUser)
|
|
{
|
|
Title = title;
|
|
Description = description;
|
|
IsUser = isUser;
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return $"{Id}\t{Title}\t{Description}\t{IsUser}";
|
|
}
|
|
|
|
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 InquiryDTO);
|
|
}
|
|
|
|
public bool Equals(InquiryDTO other)
|
|
{
|
|
return (this.Id == other.Id);
|
|
}
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
return Id;
|
|
}
|
|
} |