Restore Product class and enums; add Toon metadata

Re-enable Product class and related enums in Nop.Core.Domain.Catalog, moving them from commented to active code. Add [ToonDescription] attributes to Product properties for enhanced documentation and serialization. Mark sensitive Customer fields with [ToonIgnore] to exclude them from Toon processing.
This commit is contained in:
Loretta 2026-01-17 09:19:46 +01:00
parent c0073815ae
commit ca1ac2a2d1
10 changed files with 791 additions and 596 deletions

View File

@ -0,0 +1,22 @@
namespace Nop.Core.Domain.Catalog;
/// <summary>
/// Represents a backorder mode
/// </summary>
public enum BackorderMode
{
/// <summary>
/// No backorders
/// </summary>
NoBackorders = 0,
/// <summary>
/// Allow qty below 0
/// </summary>
AllowQtyBelow0 = 1,
/// <summary>
/// Allow qty below 0 and notify customer
/// </summary>
AllowQtyBelow0AndNotifyCustomer = 2,
}

View File

@ -23,21 +23,25 @@ public partial class Customer : BaseEntity, ISoftDeletedEntity
/// <summary> /// <summary>
/// Gets or sets the username /// Gets or sets the username
/// </summary> /// </summary>
//[ToonIgnore]
public string Username { get; set; } public string Username { get; set; }
/// <summary> /// <summary>
/// Gets or sets the email /// Gets or sets the email
/// </summary> /// </summary>
//[ToonIgnore]
public string Email { get; set; } public string Email { get; set; }
/// <summary> /// <summary>
/// Gets or sets the first name /// Gets or sets the first name
/// </summary> /// </summary>
//[ToonIgnore]
public string FirstName { get; set; } public string FirstName { get; set; }
/// <summary> /// <summary>
/// Gets or sets the last name /// Gets or sets the last name
/// </summary> /// </summary>
//[ToonIgnore]
public string LastName { get; set; } public string LastName { get; set; }
/// <summary> /// <summary>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,17 @@
namespace Nop.Core.Domain.Catalog;
/// <summary>
/// Represents a download activation type
/// </summary>
public enum DownloadActivationType
{
/// <summary>
/// When order is paid
/// </summary>
WhenOrderIsPaid = 0,
/// <summary>
/// Manually
/// </summary>
Manually = 10,
}

View File

@ -0,0 +1,17 @@
namespace Nop.Core.Domain.Catalog;
/// <summary>
/// Represents a gift card type
/// </summary>
public enum GiftCardType
{
/// <summary>
/// Virtual
/// </summary>
Virtual = 0,
/// <summary>
/// Physical
/// </summary>
Physical = 1,
}

View File

@ -0,0 +1,22 @@
namespace Nop.Core.Domain.Catalog;
/// <summary>
/// Represents a low stock activity
/// </summary>
public enum LowStockActivity
{
/// <summary>
/// Nothing
/// </summary>
Nothing = 0,
/// <summary>
/// Disable buy button
/// </summary>
DisableBuyButton = 1,
/// <summary>
/// Unpublish
/// </summary>
Unpublish = 2,
}

View File

@ -0,0 +1,22 @@
namespace Nop.Core.Domain.Catalog;
/// <summary>
/// Represents a method of inventory management
/// </summary>
public enum ManageInventoryMethod
{
/// <summary>
/// Don't track inventory for product
/// </summary>
DontManageStock = 0,
/// <summary>
/// Track inventory for product
/// </summary>
ManageStock = 1,
/// <summary>
/// Track inventory for product by product attributes
/// </summary>
ManageStockByAttributes = 2,
}

View File

@ -0,0 +1,17 @@
namespace Nop.Core.Domain.Catalog;
/// <summary>
/// Represents a product type
/// </summary>
public enum ProductType
{
/// <summary>
/// Simple
/// </summary>
SimpleProduct = 5,
/// <summary>
/// Grouped (product with variants)
/// </summary>
GroupedProduct = 10,
}

View File

@ -0,0 +1,27 @@
namespace Nop.Core.Domain.Catalog;
/// <summary>
/// Represents a recurring product cycle period
/// </summary>
public enum RecurringProductCyclePeriod
{
/// <summary>
/// Days
/// </summary>
Days = 0,
/// <summary>
/// Weeks
/// </summary>
Weeks = 10,
/// <summary>
/// Months
/// </summary>
Months = 20,
/// <summary>
/// Years
/// </summary>
Years = 30,
}

View File

@ -0,0 +1,27 @@
namespace Nop.Core.Domain.Catalog;
/// <summary>
/// Represents a rental product period (for prices)
/// </summary>
public enum RentalPricePeriod
{
/// <summary>
/// Days
/// </summary>
Days = 0,
/// <summary>
/// Weeks
/// </summary>
Weeks = 10,
/// <summary>
/// Months
/// </summary>
Months = 20,
/// <summary>
/// Years
/// </summary>
Years = 30,
}