mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-19 03:27:29 +02:00
Version 3.0.381
This commit is contained in:
parent
f963c0a219
commit
3a363acf3a
1525 changed files with 60589 additions and 125098 deletions
|
@ -0,0 +1,21 @@
|
|||
using System.Runtime.Serialization;
|
||||
|
||||
namespace ShareeBike.Repository.Response.Stations.Station
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds a single bike group.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public class BikeGroup
|
||||
{
|
||||
/// <summary> Holds the count of bikes for the group. </summary>
|
||||
[DataMember]
|
||||
public string bike_count { get; private set;}
|
||||
|
||||
/// <summary>
|
||||
/// Holds the group identifying the bike group type.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string bike_group { get; private set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
using System.Runtime.Serialization;
|
||||
|
||||
namespace ShareeBike.Repository.Response.Stations.Station
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds info about operator data.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public class OperatorData
|
||||
{
|
||||
[DataMember]
|
||||
public string operator_name { get; private set; }
|
||||
|
||||
[DataMember]
|
||||
public string operator_phone { get; private set; }
|
||||
|
||||
[DataMember]
|
||||
public string operator_hours { get; private set; }
|
||||
|
||||
[DataMember]
|
||||
public string operator_email { get; private set; }
|
||||
|
||||
|
||||
[DataMember]
|
||||
public string operator_color { get; private set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace ShareeBike.Repository.Response.Stations.Station
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds info about a single station.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public class StationInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Unique id of the station.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string station { get; private set; }
|
||||
|
||||
[DataMember]
|
||||
public string[] station_group { get; private set; }
|
||||
|
||||
[DataMember]
|
||||
public string description { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Position of the station.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public Position gps { get; private set; }
|
||||
|
||||
[DataMember]
|
||||
public OperatorData operator_data { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Holds the count of available bikes at the station.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string bike_count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Holds the count type of station, i.e. which bikes are located at station.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public Dictionary<string, BikeGroup> station_type { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Holds the uri of the operator which manages the bikes at station/ the station.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string uri_operator { get; private set; }
|
||||
|
||||
public static bool operator ==(StationInfo first, StationInfo second)
|
||||
=> JsonConvert.SerializeObject(first) == JsonConvert.SerializeObject(second);
|
||||
|
||||
public static bool operator !=(StationInfo first, StationInfo second)
|
||||
=> !(first == second);
|
||||
|
||||
public override bool Equals(object obj) => obj is StationInfo target && target == this;
|
||||
|
||||
public override int GetHashCode() => JsonConvert.SerializeObject(this).GetHashCode();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue