Compare commits
5 Commits
d713359512
...
developmen
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
051ce0c89e | ||
| d66a0241df | |||
| f8fbcfe26d | |||
| e81551e5d1 | |||
| 0fcf1146f8 |
@@ -38,6 +38,10 @@ namespace Core.Adapters.Lib
|
|||||||
[BsonElement("variantIds")]
|
[BsonElement("variantIds")]
|
||||||
[JsonPropertyName("variantIds")]
|
[JsonPropertyName("variantIds")]
|
||||||
public List<string> VariantIds { get; set; } = new();
|
public List<string> VariantIds { get; set; } = new();
|
||||||
|
|
||||||
|
[BsonElement("icon")]
|
||||||
|
[JsonPropertyName("icon")]
|
||||||
|
public string Icon { get; set; } = null!;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Dimensions
|
public class Dimensions
|
||||||
|
|||||||
@@ -22,5 +22,9 @@ namespace Core.Adapters.Lib
|
|||||||
[BsonElement("line")]
|
[BsonElement("line")]
|
||||||
[JsonPropertyName("line")]
|
[JsonPropertyName("line")]
|
||||||
public string Line { get; set; } = null!;
|
public string Line { get; set; } = null!;
|
||||||
|
|
||||||
|
[BsonElement("icon")]
|
||||||
|
[JsonPropertyName("icon")]
|
||||||
|
public string Icon { get; set; } = null!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
59
Inventory/ProductAdapter.cs
Normal file
59
Inventory/ProductAdapter.cs
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
using Core.Blueprint.Mongo;
|
||||||
|
using MongoDB.Bson;
|
||||||
|
using MongoDB.Bson.Serialization.Attributes;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace Core.Adapters.Lib.Inventory
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents the possible statuses of a product.
|
||||||
|
/// </summary>
|
||||||
|
public enum ProductStatus
|
||||||
|
{
|
||||||
|
Active,
|
||||||
|
Inactive,
|
||||||
|
Discontinued
|
||||||
|
}
|
||||||
|
|
||||||
|
[CollectionAttributeName("Product")]
|
||||||
|
public class ProductAdapter : Document
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the foreign key to the owning Tenant.
|
||||||
|
/// </summary>
|
||||||
|
[BsonElement("tenantId")]
|
||||||
|
[JsonPropertyName("tenantId")]
|
||||||
|
public string TenantId { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the name of the product.
|
||||||
|
/// </summary>
|
||||||
|
[BsonElement("productName")]
|
||||||
|
[JsonPropertyName("productName")]
|
||||||
|
public string ProductName { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the description of the product.
|
||||||
|
/// </summary>
|
||||||
|
[BsonElement("description")]
|
||||||
|
[JsonPropertyName("description")]
|
||||||
|
public string Description { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the status of the product. Stored as a string in MongoDB.
|
||||||
|
/// </summary>
|
||||||
|
[BsonElement("productStatus")]
|
||||||
|
[JsonPropertyName("productStatus")]
|
||||||
|
[BsonRepresentation(BsonType.String)]
|
||||||
|
public ProductStatus ProductStatus { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the list of Tag Ids associated with this product.
|
||||||
|
/// This follows the standard MongoDB practice for many-to-many relationships
|
||||||
|
/// by embedding an array of references.
|
||||||
|
/// </summary>
|
||||||
|
[BsonElement("tagIds")]
|
||||||
|
[JsonPropertyName("tagIds")]
|
||||||
|
public List<ObjectId> TagIds { get; set; } = new List<ObjectId>();
|
||||||
|
}
|
||||||
|
}
|
||||||
9
nuget.config
Normal file
9
nuget.config
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<packageSources>
|
||||||
|
<!-- Tu BaGet primero -->
|
||||||
|
<add key="BaGet" value="https://nuget.dream-views.com/v3/index.json" protocolVersion="3" />
|
||||||
|
<!-- NuGet oficial como fallback (si quieres) -->
|
||||||
|
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
|
||||||
|
</packageSources>
|
||||||
|
</configuration>
|
||||||
Reference in New Issue
Block a user