Skip to content

Commit

Permalink
add zeitabhängige beziehungen to v2 boneycomb only
Browse files Browse the repository at this point in the history
  • Loading branch information
Konstantin committed Nov 18, 2024
1 parent c120b41 commit 2f7f54e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 13 deletions.
13 changes: 0 additions & 13 deletions BO4E/Marktkommunikation/v1/BOneyComb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,4 @@ public class BOneyComb
[JsonPropertyOrder(3)]
[Newtonsoft.Json.JsonProperty(PropertyName = "links", Order = 3)]
public Dictionary<string, List<string>>? Links { get; set; }

/// <summary>
/// Similar to <see cref="Links"/> but with time dependencies.
/// </summary>
/// <remarks>
/// We didn't want to encode/serialize any information into the values of <see cref="Links"/> or loosen its typing by changing the value type to object.
/// That's why this is a separate property.
/// With this being a separate property, systems that care only about links, can simply ignore the zeitabhängige Links and those that care have a strong type to work with.
/// </remarks>
[JsonPropertyName("zeitabhaengigeLinks")]
[JsonPropertyOrder(4)]
[Newtonsoft.Json.JsonProperty(PropertyName = "zeitabhaengigeLinks", Order = 4)]
public List<ZeitabhaengigeBeziehung>? ZeitabhaengigeLinks { get; set; }
}
23 changes: 23 additions & 0 deletions BO4E/Marktkommunikation/v2/BOneyComb.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System.Collections.Generic;
using System.Text.Json.Serialization;

namespace BO4E.Marktkommunikation.v2;

/// <summary>
/// the v2 boneycomb contains all the properties of the <see cref="BO4E.Marktkommunikation.v1.BOneyComb"/> + zeitabhängige links
/// </summary>
public class BOneyComb : BO4E.Marktkommunikation.v1.BOneyComb // for now, we model this as inheritance, but we're not restricted to that
{
/// <summary>
/// Similar to <see cref="Marktkommunikation.v1.BOneyComb.Links"/> but with time dependencies.
/// </summary>
/// <remarks>
/// We didn't want to encode/serialize any information into the values of <see cref="Marktkommunikation.v1.BOneyComb.Links"/> or loosen its typing by changing the value type to object.
/// That's why this is a separate property.
/// With this being a separate property, systems that care only about links, can simply ignore the zeitabhängige Links and those that care have a strong type to work with.
/// </remarks>
[JsonPropertyName("zeitabhaengigeLinks")]
[JsonPropertyOrder(4)]
[Newtonsoft.Json.JsonProperty(PropertyName = "zeitabhaengigeLinks", Order = 4)]
public List<ZeitabhaengigeBeziehung>? ZeitabhaengigeLinks { get; set; }
}

0 comments on commit 2f7f54e

Please sign in to comment.