Compare commits
3 Commits
5ac06a4e15
...
e5c2dcd2aa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e5c2dcd2aa | ||
|
|
255062adff | ||
|
|
8744e8841b |
@ -34,7 +34,7 @@ namespace Lib.Architecture.BuildingBlocks.Helpers
|
||||
}
|
||||
}
|
||||
|
||||
if (refitException.StatusCode == HttpStatusCode.InternalServerError)
|
||||
if (refitException.StatusCode == HttpStatusCode.InternalServerError && (errorMessage is string || errorMessage is HttpError))
|
||||
port.InternalServerError(errorMessage);
|
||||
|
||||
else if (refitException.StatusCode == HttpStatusCode.NotFound)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// ***********************************************************************
|
||||
// <copyright file="AuthenticatedHttpClientHandler.cs">
|
||||
// Heath
|
||||
// AgileWebs
|
||||
// </copyright>
|
||||
// ***********************************************************************
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// ***********************************************************************
|
||||
// <copyright file="HttpContextTokenProvider.cs">
|
||||
// Heath
|
||||
// AgileWebs
|
||||
// </copyright>
|
||||
// ***********************************************************************
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// ***********************************************************************
|
||||
// <copyright file="ITokenProvider.cs">
|
||||
// Heath
|
||||
// AgileWebs
|
||||
// </copyright>
|
||||
// ***********************************************************************
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Core.Blueprint.Mongo" Version="0.3.0-alpha0047" />
|
||||
<PackageReference Include="Core.Blueprint.Mongo" Version="1.0.0" />
|
||||
<PackageReference Include="FluentValidation" Version="11.11.0" />
|
||||
<PackageReference Include="FluentValidation.AspNetCore" Version="11.3.0" />
|
||||
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.11.0" />
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// ***********************************************************************
|
||||
// <copyright file="ErrorDetailsDto.cs">
|
||||
// Heath
|
||||
// AgileWebs
|
||||
// </copyright>
|
||||
// ***********************************************************************
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// ***********************************************************************
|
||||
// <copyright file="HttpErrorDto.cs">
|
||||
// Heath
|
||||
// AgileWebs
|
||||
// </copyright>
|
||||
// ***********************************************************************
|
||||
|
||||
|
||||
@ -1,88 +0,0 @@
|
||||
using Core.Blueprint.Mongo;
|
||||
using MongoDB.Bson;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Lib.Architecture.BuildingBlocks.Adapters;
|
||||
|
||||
[CollectionAttributeName("GPSPoints")]
|
||||
public class GPSPointAdapter : Document
|
||||
{
|
||||
[BsonElement("features")]
|
||||
[JsonProperty("features")]
|
||||
public List<FeatureCollection> Features { get; set; } = null!;
|
||||
|
||||
[BsonElement("timestamp")]
|
||||
[JsonProperty("timestamp")]
|
||||
public DateTime Timestamp { get; set; }
|
||||
}
|
||||
public class FeatureCollection
|
||||
{
|
||||
[BsonElement("type")]
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; } = null!;
|
||||
|
||||
[BsonElement("geometry")]
|
||||
[JsonProperty("geometry")]
|
||||
public Geometry Geometry { get; set; } = null!;
|
||||
|
||||
[BsonElement("properties")]
|
||||
[JsonProperty("properties")]
|
||||
public Properties Properties { get; set; } = null!;
|
||||
}
|
||||
|
||||
public class Properties
|
||||
{
|
||||
[BsonElement("technicianId")]
|
||||
[BsonRepresentation(BsonType.ObjectId)]
|
||||
[JsonProperty("technicianId")]
|
||||
public string TechnicianId { get; set; } = null!;
|
||||
|
||||
[BsonElement("technicianName")]
|
||||
[JsonProperty("technicianName")]
|
||||
public string TechnicianName { get; set; } = null!;
|
||||
|
||||
[BsonElement("sbuSurveyId")]
|
||||
[BsonRepresentation(BsonType.ObjectId)]
|
||||
[JsonProperty("sbuSurveyId")]
|
||||
public string SbuSurveyId { get; set; } = null!;
|
||||
|
||||
[BsonElement("sbuSurveyMapsheetId")]
|
||||
[BsonRepresentation(BsonType.ObjectId)]
|
||||
[JsonProperty("sbuSurveyMapsheetId")]
|
||||
public string SbuSurveyMapsheetId { get; set; } = null!;
|
||||
|
||||
[BsonElement("trailId")]
|
||||
[JsonProperty("trailId")]
|
||||
public string TrailId { get; set; } = null!;
|
||||
|
||||
[BsonElement("deviceSerialNumber")]
|
||||
[JsonProperty("deviceSerialNumber")]
|
||||
public string DeviceSerialNumber { get; set; } = null!;
|
||||
}
|
||||
public class Geometry
|
||||
{
|
||||
[BsonElement("type")]
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; } = null!;
|
||||
|
||||
[BsonElement("coordinates")]
|
||||
[JsonProperty("coordinates")]
|
||||
public List<double> Coordinates { get; set; } = null!;
|
||||
|
||||
[BsonElement("latitude")]
|
||||
[JsonProperty("latitude")]
|
||||
public double Latitude { get; set; }
|
||||
|
||||
[BsonElement("longitude")]
|
||||
[JsonProperty("longitude")]
|
||||
public double Longitude { get; set; }
|
||||
|
||||
[BsonElement("orientation")]
|
||||
[JsonProperty("orientation")]
|
||||
public double Orientation { get; set; }
|
||||
|
||||
[BsonElement("accuracy")]
|
||||
[JsonProperty("accuracy")]
|
||||
public int Accuracy { get; set; }
|
||||
}
|
||||
@ -1,15 +0,0 @@
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Lib.Architecture.BuildingBlocks.Adapters;
|
||||
|
||||
public class GeometryAdapter
|
||||
{
|
||||
[BsonElement("type")]
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; } = null!;
|
||||
|
||||
[BsonElement("coordinates")]
|
||||
[JsonProperty("coordinates")]
|
||||
public List<double> Coordinates { get; set; } = null!;
|
||||
}
|
||||
@ -1,87 +0,0 @@
|
||||
using Core.Blueprint.Mongo;
|
||||
using MongoDB.Bson;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using Newtonsoft.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Lib.Architecture.BuildingBlocks.Adapters;
|
||||
|
||||
[CollectionAttributeName("Mapsheets")]
|
||||
public class MapsheetAdapter : Document
|
||||
{
|
||||
[BsonElement("features")]
|
||||
[JsonProperty("features")]
|
||||
public List<MapsheetCollection>? Features { get; set; }
|
||||
|
||||
[BsonElement("timestamp")]
|
||||
[JsonProperty("timestamp")]
|
||||
public DateTime Timestamp { get; set; }
|
||||
}
|
||||
|
||||
public class MapsheetTechnicians
|
||||
{
|
||||
[BsonElement("technicianId")]
|
||||
[BsonRepresentation(BsonType.ObjectId)]
|
||||
[JsonProperty("technicianId")]
|
||||
public string TechnicianId { get; set; } = null!;
|
||||
|
||||
[BsonElement("technicianName")]
|
||||
[JsonProperty("technicianName")]
|
||||
public string TechnicianName { get; set; } = null!;
|
||||
}
|
||||
|
||||
public class MapsheetProperties
|
||||
{
|
||||
[BsonElement("surveyId")]
|
||||
[BsonRepresentation(BsonType.ObjectId)]
|
||||
[JsonProperty("surveyId")]
|
||||
public string SurveyId { get; set; }
|
||||
|
||||
[BsonElement("mapsheetName")]
|
||||
[JsonProperty("mapsheetName")]
|
||||
public string MapsheetName { get; set; } = null!;
|
||||
|
||||
[BsonElement("workOrderNumber")]
|
||||
[JsonProperty("workOrderNumber")]
|
||||
public string WorkOrderNumber { get; set; } = null!;
|
||||
|
||||
[BsonElement("mapsheetStatus")]
|
||||
[BsonRepresentation(BsonType.String)]
|
||||
[JsonProperty("mapsheetStatus")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public MapsheetStatus MapsheetStatus { get; set; }
|
||||
|
||||
[BsonElement("footage")]
|
||||
[JsonProperty("footage")]
|
||||
public int Footage { get; set; }
|
||||
}
|
||||
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public enum MapsheetStatus
|
||||
{
|
||||
Ready = 1,
|
||||
InProgress = 2,
|
||||
Complete = 3,
|
||||
QaPending = 4,
|
||||
Closed = 5,
|
||||
Reopened = 6
|
||||
}
|
||||
|
||||
public class MapsheetCollection
|
||||
{
|
||||
[BsonElement("type")]
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; } = null!;
|
||||
|
||||
[BsonElement("mapsheetTechnicians")]
|
||||
[JsonProperty("mapsheetTechnicians")]
|
||||
public List<MapsheetTechnicians>? MapsheetTechnicians { get; set; }
|
||||
|
||||
[BsonElement("geometry")]
|
||||
[JsonProperty("geometry")]
|
||||
public List<GeometryAdapter> Geometry { get; set; } = null!;
|
||||
|
||||
[BsonElement("properties")]
|
||||
[JsonProperty("properties")]
|
||||
public MapsheetProperties? Properties { get; set; }
|
||||
}
|
||||
@ -1,29 +0,0 @@
|
||||
using Core.Blueprint.Mongo;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Lib.Architecture.BuildingBlocks.Adapters;
|
||||
|
||||
[CollectionAttributeName("Surveys")]
|
||||
public class SurveyAdapter : Document
|
||||
{
|
||||
[BsonElement("surveyName")]
|
||||
[JsonPropertyName("surveyName")]
|
||||
public string SurveyName { get; set; } = null!;
|
||||
|
||||
[BsonElement("surveyType")]
|
||||
[JsonPropertyName("surveyType")]
|
||||
public string SurveyType { get; set; } = null!;
|
||||
|
||||
[BsonElement("locations")]
|
||||
[JsonPropertyName("locations")]
|
||||
public List<string> Locations { get; set; } = [];
|
||||
|
||||
[BsonElement("project")]
|
||||
[JsonPropertyName("project")]
|
||||
public string Project { get; set; } = null!;
|
||||
|
||||
[BsonElement("surveyStatus")]
|
||||
[JsonPropertyName("surveyStatus")]
|
||||
public string SurveyStatus { get; set; } = null!;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user