This repository has been archived on 2022-11-03. You can view files and clone it, but cannot push or open issues or pull requests.
DevOpsOpenHack/support/tripviewer/web/Models/DataObjects/Poi.cs

39 lines
981 B
C#
Raw Normal View History

2022-11-03 20:41:13 +00:00
namespace Simulator.DataObjects
{
using Newtonsoft.Json;
using System;
public partial class Poi
{
[JsonProperty("tripId")]
public Guid TripId { get; set; }
[JsonProperty("latitude")]
public double Latitude { get; set; }
[JsonProperty("longitude")]
public double Longitude { get; set; }
[JsonProperty("poiType")]
public long PoiType { get; set; }
[JsonProperty("timestamp")]
public DateTime Timestamp { get; set; }
[JsonProperty("deleted")]
public bool Deleted { get; set; }
[JsonProperty("id")]
public Guid Id { get; set; }
}
public partial class Poi
{
public static Poi FromJson(string json) => JsonConvert.DeserializeObject<Poi>(json, Converter.Settings);
}
public static class PoiSerializer
{
public static string ToJson(this Poi self) => JsonConvert.SerializeObject(self, Converter.Settings);
}
}