11 Commits

Author SHA1 Message Date
Oscar Morales
051ce0c89e Add Icon propertie in FurnitureBase and FurnitureVariant 2025-09-03 10:42:42 -06:00
d66a0241df feat: nuget 2025-09-02 13:57:12 -06:00
f8fbcfe26d feat: updated product status property name 2025-08-05 18:06:29 -06:00
e81551e5d1 Merge pull request 'feat: added ProductAdapter class' (#3) from feature/create-Product-and-ProductTag-CRUD-(adapters) into development
Reviewed-on: #3
Reviewed-by: Sergio Matías <sergio.matias@agilewebs.com>
2025-08-03 21:31:29 +00:00
0fcf1146f8 feat: added ProductAdapter class
- included relationship with TagAdapter
2025-08-03 14:53:06 -06:00
d713359512 Merge pull request 'Change ParentTagId type from string to string[] in TagAdapter' (#2) from feature/change-parenttagid-type into development
Reviewed-on: #2
Reviewed-by: efrain_marin <efrain.marin@agilewebs.com>
Reviewed-by: Sergio Matías <sergio.matias@agilewebs.com>
2025-08-01 22:11:47 +00:00
Oscar Morales
163eb0e5aa Change ParentTagId type from string to string[] in TagAdapter 2025-08-01 09:07:58 -06:00
7866ef07d5 Merge pull request 'Add tags adapters' (#1) from feature/add-tags-adapters into development
Reviewed-on: #1
Reviewed-by: Sergio Matías <sergio.matias@agilewebs.com>
2025-08-01 01:05:52 +00:00
Oscar Morales
df50e72359 Add tags adapters 2025-07-31 16:39:38 -06:00
Sergio Matias Urquin
a266aa5001 Merge branch 'feature/inventory' into development 2025-07-30 19:08:04 -06:00
4a241e401e Original State 2025-06-21 23:56:52 -06:00
7 changed files with 162 additions and 0 deletions

View File

@@ -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

View File

@@ -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!;
} }
} }

View 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>();
}
}

38
Inventory/TagAdapter.cs Normal file
View File

@@ -0,0 +1,38 @@
using Core.Blueprint.Mongo;
using MongoDB.Bson.Serialization.Attributes;
using System.Text.Json.Serialization;
namespace Core.Adapters.Lib
{
[CollectionAttributeName("Tag")]
public class TagAdapter : Document
{
[BsonElement("tenantId")]
[JsonPropertyName("tenantId")]
public string TenantId { get; set; } = null!;
[BsonElement("tagName")]
[JsonPropertyName("tagName")]
public string TagName { get; set; } = null!;
[BsonElement("typeId")]
[JsonPropertyName("typeId")]
public string TypeId { get; set; } = null!;
[BsonElement("parentTagId")]
[JsonPropertyName("parentTagId")]
public string[] ParentTagId { get; set; } = null!;
[BsonElement("slug")]
[JsonPropertyName("slug")]
public string Slug { get; set; } = null!;
[BsonElement("displayOrder")]
[JsonPropertyName("displayOrder")]
public int DisplayOrder { get; set; }
[BsonElement("icon")]
[JsonPropertyName("icon")]
public string Icon { get; set; } = null!;
}
}

View File

@@ -0,0 +1,22 @@
using Core.Blueprint.Mongo;
using MongoDB.Bson.Serialization.Attributes;
using System.Text.Json.Serialization;
namespace Core.Adapters.Lib
{
[CollectionAttributeName("TagOverride")]
public class TagOverrideAdapter : Document
{
[BsonElement("tenantId")]
[JsonPropertyName("tenantId")]
public string TenantId { get; set; } = null!;
[BsonElement("baseTagId")]
[JsonPropertyName("baseTagId")]
public string BaseTagId { get; set; } = null!;
[BsonElement("overrideTagId")]
[JsonPropertyName("overrideTagId")]
public string OverrideTagId { get; set; } = null!;
}
}

View File

@@ -0,0 +1,26 @@
using Core.Blueprint.Mongo;
using MongoDB.Bson.Serialization.Attributes;
using System.Text.Json.Serialization;
namespace Core.Adapters.Lib
{
[CollectionAttributeName("TagType")]
public class TagTypeAdapter : Document
{
[BsonElement("tenantId")]
[JsonPropertyName("tenantId")]
public string TenantId { get; set; } = null!;
[BsonElement("typeName")]
[JsonPropertyName("typeName")]
public string TypeName { get; set; } = null!;
[BsonElement("level")]
[JsonPropertyName("level")]
public int Level { get; set; }
[BsonElement("parentTypeId")]
[JsonPropertyName("parentTypeId")]
public string ParentTypeId { get; set; } = null!;
}
}

9
nuget.config Normal file
View 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>