Add serialization attributes and update to PROD config

Annotated core entities with AcBinarySerializable and ToonDescription for improved serialization and documentation. Updated appsettings.json to use the production database. Changed solution file to target Visual Studio 17. Added necessary using statements and metadata for entity classes.
This commit is contained in:
Loretta 2026-03-20 17:06:49 +01:00
parent e47c7c8f74
commit ced4b98908
10 changed files with 33 additions and 11 deletions

View File

@ -1,10 +1,12 @@
using AyCode.Core.Serializers.Toons;
using AyCode.Core.Serializers.Attributes;
using AyCode.Core.Serializers.Toons;
using Nop.Core.Domain.Catalog;
using Nop.Core.Domain.Common;
using Nop.Core.Domain.Customers;
namespace Mango.Nop.Core.Dtos;
[AcBinarySerializable(false, true, false, true)]
[LinqToDB.Mapping.Table(Name = nameof(Customer))]
[System.ComponentModel.DataAnnotations.Schema.Table(nameof(Customer))]
[ToonDescription($"Data transfer object for {nameof(Customer)}", TypeRelation = ToonTypeRelation.DtoOf, RelatedTypes = [typeof(Customer)])]

View File

@ -1,4 +1,5 @@
using AyCode.Core.Serializers.Toons;
using AyCode.Core.Serializers.Attributes;
using AyCode.Core.Serializers.Toons;
using Nop.Core.Domain.Common;
using Nop.Core.Domain.Tax;
@ -7,6 +8,7 @@ namespace Nop.Core.Domain.Customers;
/// <summary>
/// Represents a customer
/// </summary>
[AcBinarySerializable(false, true, false, true)]
[ToonDescription("NopCommerce customer entity")]
public partial class Customer : BaseEntity, ISoftDeletedEntity
{

View File

@ -1,8 +1,11 @@
namespace Nop.Core.Domain.Customers;
using AyCode.Core.Serializers.Attributes;
namespace Nop.Core.Domain.Customers;
/// <summary>
/// Represents a customer role
/// </summary>
[AcBinarySerializable(false, true, false, true)]
public partial class CustomerRole : BaseEntity
{
/// <summary>

View File

@ -1,8 +1,11 @@
namespace Nop.Core.Domain.Discounts;
using AyCode.Core.Serializers.Attributes;
namespace Nop.Core.Domain.Discounts;
/// <summary>
/// Represents a discount-product mapping class
/// </summary>
[AcBinarySerializable(false, true, false, true)]
public partial class DiscountProductMapping : DiscountMapping
{
/// <summary>

View File

@ -1,10 +1,12 @@
using AyCode.Core.Serializers.Toons;
using AyCode.Core.Serializers.Attributes;
using AyCode.Core.Serializers.Toons;
namespace Nop.Core.Domain.Common;
/// <summary>
/// Represents a generic attribute
/// </summary>
[AcBinarySerializable(false, true, false, true)]
[ToonDescription("NopCommerce generic attribute for key-value storage", Purpose = "A flexible key-value store used to extend entities with custom business logic data without changing the database schema")]
public partial class GenericAttribute : BaseEntity
{

View File

@ -1,6 +1,6 @@
using Nop.Core.Domain.Common;
using AyCode.Core.Serializers.Attributes;
using AyCode.Core.Serializers.Toons;
using Nop.Core.Domain.Common;
using Nop.Core.Domain.Payments;
using Nop.Core.Domain.Shipping;
using Nop.Core.Domain.Tax;
@ -10,6 +10,7 @@ namespace Nop.Core.Domain.Orders;
/// <summary>
/// Represents an order
/// </summary>
[AcBinarySerializable(false, true, false, true)]
[ToonDescription("NopCommerce order entity with payment and shipping")]
public partial class Order : BaseEntity, ISoftDeletedEntity
{

View File

@ -1,10 +1,13 @@
namespace Nop.Core.Domain.Orders;
using AyCode.Core.Serializers.Attributes;
using AyCode.Core.Serializers.Toons;
/// <summary>
/// Represents an order item
/// </summary>
[AcBinarySerializable(false, true, false, true)]
[ToonDescription("NopCommerce order item entity")]
public partial class OrderItem : BaseEntity
{

View File

@ -1,10 +1,12 @@
using AyCode.Core.Serializers.Toons;
using AyCode.Core.Serializers.Attributes;
using AyCode.Core.Serializers.Toons;
namespace Nop.Core.Domain.Orders;
/// <summary>
/// Represents an order note
/// </summary>
[AcBinarySerializable(false, true, false, true)]
[ToonDescription("NopCommerce order note entity")]
public partial class OrderNote : BaseEntity
{

View File

@ -1,16 +1,18 @@
using Nop.Core.Domain.Common;
using AyCode.Core.Serializers.Attributes;
using AyCode.Core.Serializers.Toons;
using Nop.Core.Domain.Common;
using Nop.Core.Domain.Discounts;
using Nop.Core.Domain.Localization;
using Nop.Core.Domain.Security;
using Nop.Core.Domain.Seo;
using Nop.Core.Domain.Stores;
using AyCode.Core.Serializers.Toons;
namespace Nop.Core.Domain.Catalog;
/// <summary>
/// Represents a product
/// </summary>
[AcBinarySerializable(false, true, false, true)]
[ToonDescription("Core nopCommerce product entity with catalog, pricing, and inventory management")]
public partial class Product : BaseEntity, ILocalizedEntity, ISlugSupported, IAclSupported, IStoreMappingSupported, IDiscountSupported<DiscountProductMapping>, ISoftDeletedEntity
{

View File

@ -1,4 +1,5 @@
using AyCode.Core.Serializers.Toons;
using AyCode.Core.Serializers.Attributes;
using AyCode.Core.Serializers.Toons;
using AyCode.Interfaces.Entities;
using LinqToDB.Mapping;
using Mango.Nop.Core.Interfaces;
@ -19,6 +20,7 @@ public interface IMgStockQuantityHistory
/// <summary>
/// Represents a stock quantity change entry
/// </summary>
[AcBinarySerializable(false, true, false, true)]
[Table(Name = nameof(StockQuantityHistory))]
[ToonDescription("NopCommerce stock movement log", Purpose = "Audit trail for physical and logical stock movements")]
public partial class StockQuantityHistory : BaseEntity, IMgStockQuantityHistory