using Core.Blueprint.Mongo;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using System.Text.Json.Serialization;
namespace Core.Adapters.Lib.Inventory
{
    /// 
    /// Represents the possible statuses of a product.
    /// 
    public enum ProductStatus
    {
        Active,
        Inactive,
        Discontinued
    }
    [CollectionAttributeName("Product")]
    public class ProductAdapter : Document
    {
        /// 
        /// Gets or sets the foreign key to the owning Tenant.
        /// 
        [BsonElement("tenantId")]
        [JsonPropertyName("tenantId")]
        public string TenantId { get; set; } = null!;
        /// 
        /// Gets or sets the name of the product.
        /// 
        [BsonElement("productName")]
        [JsonPropertyName("productName")]
        public string ProductName { get; set; } = null!;
        /// 
        /// Gets or sets the description of the product.
        /// 
        [BsonElement("description")]
        [JsonPropertyName("description")]
        public string Description { get; set; } = null!;
        /// 
        /// Gets or sets the status of the product. Stored as a string in MongoDB.
        /// 
        [BsonElement("productStatus")]
        [JsonPropertyName("productStatus")]
        [BsonRepresentation(BsonType.String)]
        public ProductStatus ProductStatus { get; set; }
        /// 
        /// 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.
        /// 
        [BsonElement("tagIds")]
        [JsonPropertyName("tagIds")]
        public List TagIds { get; set; } = new List();
    }
}