mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-05 10:36:30 +01:00
31 lines
1.2 KiB
C#
31 lines
1.2 KiB
C#
using System;
|
|
using System.Runtime.Serialization;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace ShareeBike.Repository.Response
|
|
{
|
|
[DataContract]
|
|
[JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)]
|
|
public class BikeInfoAvailable : BikeInfoBase, IEquatable<BikeInfoAvailable>
|
|
{
|
|
/// <summary>Mini survey for bikes which were rented before and for which feedback is pending.</summary>
|
|
[DataMember]
|
|
public MiniSurveyResponse user_miniquery { get; private set; }
|
|
|
|
/// <summary> Information about Co2- saving for bikes which were rented before and for which feedback is pending.</summary>
|
|
[DataMember]
|
|
public string co2saving { get; private set; }
|
|
|
|
public static bool operator ==(BikeInfoAvailable first, BikeInfoAvailable second)
|
|
=> JsonConvert.SerializeObject(first) == JsonConvert.SerializeObject(second);
|
|
|
|
public static bool operator !=(BikeInfoAvailable first, BikeInfoAvailable second)
|
|
=> !(first == second);
|
|
|
|
public override bool Equals(object obj) => obj is BikeInfoAvailable target && target == this;
|
|
|
|
public override int GetHashCode() => JsonConvert.SerializeObject(this).GetHashCode();
|
|
|
|
public bool Equals(BikeInfoAvailable other) => other == this;
|
|
}
|
|
}
|