Add ToonDescription attributes for enhanced metadata support
Introduced Toon serialization/description attributes to CustomerDto, GenericAttribute, and OrderNote classes. Added table mapping and foreign key metadata, as well as necessary using statements, to improve serialization, documentation, and tooling capabilities.
This commit is contained in:
parent
0eeefedee3
commit
7bcd601035
|
|
@ -1,8 +1,13 @@
|
||||||
using Nop.Core.Domain.Common;
|
using AyCode.Core.Serializers.Toons;
|
||||||
|
using Nop.Core.Domain.Catalog;
|
||||||
|
using Nop.Core.Domain.Common;
|
||||||
using Nop.Core.Domain.Customers;
|
using Nop.Core.Domain.Customers;
|
||||||
|
|
||||||
namespace Mango.Nop.Core.Dtos;
|
namespace Mango.Nop.Core.Dtos;
|
||||||
|
|
||||||
|
[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)])]
|
||||||
public class CustomerDto : ModelDtoBase<Customer>, ISoftDeletedEntity
|
public class CustomerDto : ModelDtoBase<Customer>, ISoftDeletedEntity
|
||||||
{
|
{
|
||||||
public string Username { get; set; }
|
public string Username { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
namespace Nop.Core.Domain.Common;
|
using AyCode.Core.Serializers.Toons;
|
||||||
|
|
||||||
|
namespace Nop.Core.Domain.Common;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a generic attribute
|
/// Represents a generic attribute
|
||||||
|
|
@ -8,6 +10,8 @@ public partial class GenericAttribute : BaseEntity
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the entity identifier
|
/// Gets or sets the entity identifier
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
///
|
||||||
|
[ToonDescription(Constraints = "polymorphic-fk(KeyGroup)")]
|
||||||
public int EntityId { get; set; }
|
public int EntityId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
namespace Nop.Core.Domain.Orders;
|
using AyCode.Core.Serializers.Toons;
|
||||||
|
|
||||||
|
namespace Nop.Core.Domain.Orders;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents an order note
|
/// Represents an order note
|
||||||
|
|
@ -8,6 +10,7 @@ public partial class OrderNote : BaseEntity
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the order identifier
|
/// Gets or sets the order identifier
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[ToonDescription($"Foreign key to parent {nameof(Order)}", ForeignKey = nameof(Order))]
|
||||||
public int OrderId { get; set; }
|
public int OrderId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue