diff --git a/Core.Adapters.Lib.csproj b/Core.Adapters.Lib.csproj new file mode 100644 index 0000000..abcdefc --- /dev/null +++ b/Core.Adapters.Lib.csproj @@ -0,0 +1,13 @@ + + + + net8.0 + enable + enable + + + + + + + diff --git a/Core.Adapters.Lib.sln b/Core.Adapters.Lib.sln new file mode 100644 index 0000000..074a0bf --- /dev/null +++ b/Core.Adapters.Lib.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.14.36212.18 d17.14 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core.Adapters.Lib", "Core.Adapters.Lib.csproj", "{AA3D06CA-C120-443B-8FC9-AE9098285271}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AA3D06CA-C120-443B-8FC9-AE9098285271}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AA3D06CA-C120-443B-8FC9-AE9098285271}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AA3D06CA-C120-443B-8FC9-AE9098285271}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AA3D06CA-C120-443B-8FC9-AE9098285271}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {00C9247B-BA90-4F25-923A-03A1843C74CC} + EndGlobalSection +EndGlobal diff --git a/Inventory/Base/InventoryItem.cs b/Inventory/Base/InventoryItem.cs new file mode 100644 index 0000000..e45586b --- /dev/null +++ b/Inventory/Base/InventoryItem.cs @@ -0,0 +1,29 @@ +using Core.Blueprint.Mongo; +using MongoDB.Bson.Serialization.Attributes; +using System.Text.Json.Serialization; + +namespace Core.Adapters.Lib.Inventory.Base +{ + [CollectionAttributeName("Inventory")] + public class InventoryItem : Document + { + [BsonElement("name")] + [JsonPropertyName("name")] + public string Name { get; set; } + + [BsonElement("description")] + [JsonPropertyName("description")] + public string Description { get; set; } + + [BsonElement("stock")] + [JsonPropertyName("stock")] + public int Stock { get; set; } + + [BsonElement("representation")] + [JsonPropertyName("representation")] + public string Representation { get; set; } + + + public string Company { get; set; } + } +}