Skip to content

Commit

Permalink
feat: add [JsonIgnore]d Guid? Id` key Property to all Model Classes (
Browse files Browse the repository at this point in the history
  • Loading branch information
hf-kklein authored Oct 15, 2024
1 parent 7936fae commit 48e3991
Show file tree
Hide file tree
Showing 26 changed files with 106 additions and 0 deletions.
4 changes: 4 additions & 0 deletions MaLoIdentModels/MaLoIdentModels/Address.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ namespace MaLoIdentModels;

public class Address
{
[JsonIgnore]
[Key]
public System.Guid? Id { get; set; }

[JsonPropertyName("countryCode")]
[RegularExpression(@"[A-Z]{2}")]
public string? CountryCode { get; set; }
Expand Down
5 changes: 5 additions & 0 deletions MaLoIdentModels/MaLoIdentModels/DataControllableResource.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;

namespace MaLoIdentModels;

public class DataControllableResource
{
[JsonIgnore]
[Key]
public System.Guid? Id { get; set; }

[JsonPropertyName("srId")]
public string? SrId { get; set; }

Expand Down
4 changes: 4 additions & 0 deletions MaLoIdentModels/MaLoIdentModels/DataMarketLocation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ namespace MaLoIdentModels;

public class DataMarketLocation
{
[JsonIgnore]
[System.ComponentModel.DataAnnotations.Key]
public System.Guid? Id { get; set; }

[JsonPropertyName("maloId")]
public string? MaloId { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ namespace MaLoIdentModels;

public class DataMarketLocationProperties
{
[JsonIgnore]
[System.ComponentModel.DataAnnotations.Key]
public Guid? Id { get; set; }

[JsonPropertyName("marketLocationProperty")]
public MarketLocationProperty MarketLocationProperty { get; set; }

Expand Down
4 changes: 4 additions & 0 deletions MaLoIdentModels/MaLoIdentModels/DataMeterLocation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ namespace MaLoIdentModels;

public class DataMeterLocation
{
[JsonIgnore]
[System.ComponentModel.DataAnnotations.Key]
public System.Guid? Id { get; set; }

[JsonPropertyName("meloId")]
public string? MeloId { get; set; }

Expand Down
4 changes: 4 additions & 0 deletions MaLoIdentModels/MaLoIdentModels/DataNetworkLocation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ namespace MaLoIdentModels;

public class DataNetworkLocation
{
[JsonIgnore]
[System.ComponentModel.DataAnnotations.Key]
public System.Guid? Id { get; set; }

[JsonPropertyName("neloId")]
public string? NeloId { get; set; }

Expand Down
4 changes: 4 additions & 0 deletions MaLoIdentModels/MaLoIdentModels/DataTechnicalResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ namespace MaLoIdentModels;

public class DataTechnicalResource
{
[JsonIgnore]
[System.ComponentModel.DataAnnotations.Key]
public System.Guid? Id { get; set; }

[JsonPropertyName("trId")]
public string? TrId { get; set; }
}
4 changes: 4 additions & 0 deletions MaLoIdentModels/MaLoIdentModels/DataTranche.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ namespace MaLoIdentModels;

public class DataTranche
{
[JsonIgnore]
[System.ComponentModel.DataAnnotations.Key]
public System.Guid? Id { get; set; }

[JsonPropertyName("tranchenId")]
public string? TranchenId { get; set; }

Expand Down
4 changes: 4 additions & 0 deletions MaLoIdentModels/MaLoIdentModels/GeographicCoordinates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ namespace MaLoIdentModels;

public class GeographicCoordinates
{
[JsonIgnore]
[System.ComponentModel.DataAnnotations.Key]
public System.Guid? Id { get; set; }

[JsonPropertyName("latitude")]
public string? Latitude { get; set; }

Expand Down
4 changes: 4 additions & 0 deletions MaLoIdentModels/MaLoIdentModels/IdentificationParameter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ namespace MaLoIdentModels;

public class IdentificationParameter
{
[JsonIgnore]
[System.ComponentModel.DataAnnotations.Key]
public Guid? Id { get; set; }

[JsonConverter(typeof(DateTimeOffsetWithTrailingZConverter))]
[JsonPropertyName("identificationDateTime")]
public DateTimeOffset IdentificationDateTime { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ namespace MaLoIdentModels;

public class IdentificationParameterIdentificationParameterAddress
{
[JsonIgnore]
[System.ComponentModel.DataAnnotations.Key]
public System.Guid? Id { get; set; }

[JsonPropertyName("name")]
public Name? Name { get; set; }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;

namespace MaLoIdentModels;

public class IdentificationParameterIdentificationParameterId
{
[JsonIgnore]
[Key]
public System.Guid? Id { get; set; }

[JsonPropertyName("maloId")]
public string? MaloId { get; set; }

Expand Down
4 changes: 4 additions & 0 deletions MaLoIdentModels/MaLoIdentModels/LandParcel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ namespace MaLoIdentModels;

public class LandParcel
{
[JsonIgnore]
[System.ComponentModel.DataAnnotations.Key]
public System.Guid? Id { get; set; }

[JsonPropertyName("districtName")]
public string? DistrictName { get; set; }

Expand Down
4 changes: 4 additions & 0 deletions MaLoIdentModels/MaLoIdentModels/MarketLocationDateTime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ namespace MaLoIdentModels;

public class MarketLocationDateTime
{
[JsonIgnore]
[Key]
public Guid? Id { get; set; }

[JsonPropertyName("maloId")]
[RegularExpression(@"\d{11}")]
public string? MaloId { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ namespace MaLoIdentModels;

public class MarketLocationMeasuringPointOperator
{
[JsonIgnore]
[System.ComponentModel.DataAnnotations.Key]
public Guid? Id { get; set; }

[JsonPropertyName("marketPartnerId")]
public long MarketPartnerId { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ namespace MaLoIdentModels;

public class MarketLocationNetworkOperator
{
[JsonIgnore]
[System.ComponentModel.DataAnnotations.Key]
public Guid? Id { get; set; }

[JsonPropertyName("marketPartnerId")]
public long MarketPartnerId { get; set; }

Expand Down
4 changes: 4 additions & 0 deletions MaLoIdentModels/MaLoIdentModels/MarketLocationProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ namespace MaLoIdentModels;

public class MarketLocationProperties
{
[JsonIgnore]
[System.ComponentModel.DataAnnotations.Key]
public Guid? Id { get; set; }

[JsonConverter(typeof(JsonStringEnumConverter))]
[JsonPropertyName("marketLocationProperty")]
public MarketLocationProperty MarketLocationProperty { get; set; }
Expand Down
4 changes: 4 additions & 0 deletions MaLoIdentModels/MaLoIdentModels/MarketLocationSupplier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ namespace MaLoIdentModels;

public class MarketLocationSupplier
{
[JsonIgnore]
[System.ComponentModel.DataAnnotations.Key]
public Guid? Id { get; set; }

[JsonPropertyName("marketPartnerId")]
public long MarketPartnerId { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ namespace MaLoIdentModels;

public class MarketLocationTransmissionSystemOperator
{
[JsonIgnore]
[System.ComponentModel.DataAnnotations.Key]
public Guid? Id { get; set; }

[JsonPropertyName("marketPartnerId")]
public long MarketPartnerId { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ namespace MaLoIdentModels;

public class MeterLocationMeasuringPointOperator
{
[JsonIgnore]
[System.ComponentModel.DataAnnotations.Key]
public Guid? Id { get; set; }

[JsonPropertyName("marketPartnerId")]
public long MarketPartnerId { get; set; }

Expand Down
4 changes: 4 additions & 0 deletions MaLoIdentModels/MaLoIdentModels/Name.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ namespace MaLoIdentModels;

public class Name
{
[JsonIgnore]
[System.ComponentModel.DataAnnotations.Key]
public System.Guid? Id { get; set; }

[JsonPropertyName("surnames")]
public string? Surnames { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ namespace MaLoIdentModels;

public class NetworkLocationMeasuringPointOperator
{
[JsonIgnore]
[System.ComponentModel.DataAnnotations.Key]
public Guid? Id { get; set; }

[JsonPropertyName("marketPartnerId")]
public long MarketPartnerId { get; set; }

Expand Down
4 changes: 4 additions & 0 deletions MaLoIdentModels/MaLoIdentModels/ResultNegative.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ namespace MaLoIdentModels;

public class ResultNegative
{
[JsonIgnore]
[Key]
public System.Guid? Id { get; set; }

[JsonPropertyName("decisionTree")]
[RegularExpression(@"E_\d{4}")]
public string? DecisionTree { get; set; }
Expand Down
4 changes: 4 additions & 0 deletions MaLoIdentModels/MaLoIdentModels/ResultPositive.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ namespace MaLoIdentModels;

public class ResultPositive
{
[JsonIgnore]
[Key]
public System.Guid? Id { get; set; }

[JsonPropertyName("dataMarketLocation")]
public DataMarketLocation? DataMarketLocation { get; set; }

Expand Down
4 changes: 4 additions & 0 deletions MaLoIdentModels/MaLoIdentModels/SrMarketPartner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ namespace MaLoIdentModels;

public class SrMarketPartner
{
[JsonIgnore]
[System.ComponentModel.DataAnnotations.Key]
public Guid? Id { get; set; }

[JsonPropertyName("marketPartnerId")]
public long MarketPartnerId { get; set; }

Expand Down
4 changes: 4 additions & 0 deletions MaLoIdentModels/MaLoIdentModels/TrancheSupplier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ namespace MaLoIdentModels;

public class TrancheSupplier
{
[JsonIgnore]
[System.ComponentModel.DataAnnotations.Key]
public Guid? Id { get; set; }

[JsonPropertyName("marketPartnerId")]
public long MarketPartnerId { get; set; }

Expand Down

0 comments on commit 48e3991

Please sign in to comment.