Skip to content

Commit

Permalink
feat: Added sub tag type to tagdata and dummy data for tag type and s…
Browse files Browse the repository at this point in the history
…ub tag type
  • Loading branch information
DanielBohme committed Oct 17, 2023
1 parent a78d167 commit 20b33d2
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions datasheetapi/Adapters/TagDataAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ private static T DefaultToDto<T>(ITagData tagData)
Sequence = tagData.Sequence,
System = tagData.System,
TagType = tagData.TagType,
SubTagType = tagData.SubTagType,
Version = tagData.Version,
RevisionContainer = null,
};
Expand Down
1 change: 1 addition & 0 deletions datasheetapi/Dtos/TagData/ITagDataDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public interface ITagDataDto
string? Sequence { get; set; }
string? System { get; set; }
string? TagType { get; set; }
string? SubTagType { get; set; }
int Version { get; set; }
TagDataReviewDto? Review { get; set; }
RevisionContainerDto? RevisionContainer { get; set; }
Expand Down
1 change: 1 addition & 0 deletions datasheetapi/Dtos/TagData/TagDataDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public record TagDataDto : ITagDataDto, IBaseEntityDto
public string? Sequence { get; set; }
public string? System { get; set; }
public string? TagType { get; set; }
public string? SubTagType { get; set; }
public int Version { get; set; }
public TagDataReviewDto? Review { get; set; }
public RevisionContainerDto? RevisionContainer { get; set; }
Expand Down
1 change: 1 addition & 0 deletions datasheetapi/Models/TagData/ITagData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public interface ITagData
string? Sequence { get; set; }
string? System { get; set; }
string? TagType { get; set; }
string? SubTagType { get; set; }
int Version { get; set; }
}
}
1 change: 1 addition & 0 deletions datasheetapi/Models/TagData/TagData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ public class TagData : ITagData
public string? Sequence { get; set; }
public string? System { get; set; }
public string? TagType { get; set; }
public string? SubTagType { get; set; }
public int Version { get; set; }
}
14 changes: 14 additions & 0 deletions datasheetapi/Repositories/DummyData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ public static void AddTagDataToRevisionContainerIfMissing(string tagNo, Revision
Sequence = "Sequence1",
System = "System1",
Version = 3,
TagType = "Flow Transmitter",
SubTagType = "Coriolis",
InstrumentSupplierOfferedProduct = new()
{
Manufacturer = "KROHNE",
Expand Down Expand Up @@ -405,6 +407,8 @@ public static void AddTagDataToRevisionContainerIfMissing(string tagNo, Revision
EngineeringCode = "",
PurchaseOrder = "",
Version = 1,
TagType = "Flow Transmitter",
SubTagType = "Coriolis",
InstrumentSupplierOfferedProduct = new()
{
Manufacturer = "KROHNE",
Expand Down Expand Up @@ -672,6 +676,8 @@ public static void AddTagDataToRevisionContainerIfMissing(string tagNo, Revision
ContractName = "Contract 1",
EngineeringCode = "",
PurchaseOrder = "",
TagType = "Flow Transmitter",
SubTagType = "Coriolis",
InstrumentSupplierOfferedProduct = new()
{
Manufacturer = null,
Expand Down Expand Up @@ -939,6 +945,8 @@ public static void AddTagDataToRevisionContainerIfMissing(string tagNo, Revision
ContractName = "Contract 1",
EngineeringCode = "",
PurchaseOrder = "",
TagType = "Flow Transmitter",
SubTagType = "Coriolis",
InstrumentSupplierOfferedProduct = new()
{
Manufacturer = null,
Expand Down Expand Up @@ -1206,6 +1214,8 @@ public static void AddTagDataToRevisionContainerIfMissing(string tagNo, Revision
ContractName = "Contract 1",
EngineeringCode = "",
PurchaseOrder = "",
TagType = "Flow Transmitter",
SubTagType = "Coriolis",
InstrumentSupplierOfferedProduct = new()
{
Manufacturer = "KROHNE",
Expand Down Expand Up @@ -1473,6 +1483,8 @@ public static void AddTagDataToRevisionContainerIfMissing(string tagNo, Revision
ContractName = "Contract 1",
EngineeringCode = "",
PurchaseOrder = "",
TagType = "Flow Transmitter",
SubTagType = "Coriolis",
InstrumentSupplierOfferedProduct = new()
{
Manufacturer = "KROHNE",
Expand Down Expand Up @@ -1739,6 +1751,8 @@ public static void AddTagDataToRevisionContainerIfMissing(string tagNo, Revision
ContractName = "Contract 1",
EngineeringCode = "",
PurchaseOrder = "",
TagType = "Flow Transmitter",
SubTagType = "Coriolis",
InstrumentPurchaserRequirement = new()
{
Manufacturer = "KROHNE",
Expand Down

0 comments on commit 20b33d2

Please sign in to comment.