Add Tag CRUD

This commit is contained in:
Oscar Morales
2025-08-01 11:45:04 -06:00
parent 406ff07f62
commit 53a420ffd1
6 changed files with 528 additions and 1 deletions

View File

@@ -0,0 +1,67 @@
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using System.Text.Json.Serialization;
namespace Core.Inventory.Domain.Contexts.Inventory.Request
{
/// <summary>
/// Data transfer object (DTO) for adding Tag.
/// </summary>
public class TagRequest
{
/// <summary>
/// Gets or sets the tenantId of the Tag.
/// </summary>
[BsonElement("tenantId")]
[BsonRepresentation(BsonType.String)]
[JsonPropertyName("tenantId")]
public string TenantId { get; set; } = null!;
/// <summary>
/// Gets or sets the name of the Tag.
/// </summary>
[BsonElement("tagName")]
[BsonRepresentation(BsonType.String)]
[JsonPropertyName("tagName")]
public string TagName { get; set; } = null!;
/// <summary>
/// Gets or sets the typeId of the Tag.
/// </summary>
[BsonElement("typeId")]
[BsonRepresentation(BsonType.String)]
[JsonPropertyName("typeId")]
public string TypeId { get; set; } = null!;
/// <summary>
/// Gets or sets the parentTagId of the Tag.
/// </summary>
[BsonElement("parentTagId")]
[JsonPropertyName("parentTagId")]
public string[] ParentTagId { get; set; } = null!;
/// <summary>
/// Gets or sets the slug of the Tag.
/// </summary>
[BsonElement("slug")]
[BsonRepresentation(BsonType.String)]
[JsonPropertyName("slug")]
public string Slug { get; set; } = null!;
/// <summary>
/// Gets or sets the displayOrder of the Tag.
/// </summary>
[BsonElement("displayOrder")]
[BsonRepresentation(BsonType.String)]
[JsonPropertyName("displayOrder")]
public int DisplayOrder { get; set; }
/// <summary>
/// Gets or sets the icon of the Tag.
/// </summary>
[BsonElement("icon")]
[BsonRepresentation(BsonType.String)]
[JsonPropertyName("icon")]
public string Icon { get; set; } = null!;
}
}