refactor: 重命名商户门店DTO
This commit is contained in:
@@ -96,7 +96,7 @@ public sealed class MerchantDetailDto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 门店列表。
|
/// 门店列表。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IReadOnlyList<StoreDto> Stores { get; init; } = [];
|
public IReadOnlyList<MerchantStoreDto> Stores { get; init; } = [];
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 并发控制版本。
|
/// 并发控制版本。
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ namespace TakeoutSaaS.Application.App.Merchants.Dto;
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 商户详情门店 DTO。
|
/// 商户详情门店 DTO。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed class StoreDto
|
public sealed class MerchantStoreDto
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 门店 ID。
|
/// 门店 ID。
|
||||||
@@ -50,7 +50,7 @@ internal static class MerchantMapping
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 将商户实体映射为详情 DTO。
|
/// 将商户实体映射为详情 DTO。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static MerchantDetailDto ToDetailDto(Merchant merchant, string? tenantName, IReadOnlyList<StoreDto> stores) => new()
|
public static MerchantDetailDto ToDetailDto(Merchant merchant, string? tenantName, IReadOnlyList<MerchantStoreDto> stores) => new()
|
||||||
{
|
{
|
||||||
Id = merchant.Id,
|
Id = merchant.Id,
|
||||||
TenantId = merchant.TenantId,
|
TenantId = merchant.TenantId,
|
||||||
@@ -150,7 +150,7 @@ internal static class MerchantMapping
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 将门店实体映射为 DTO。
|
/// 将门店实体映射为 DTO。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static StoreDto ToStoreDto(Store store) => new()
|
public static MerchantStoreDto ToStoreDto(Store store) => new()
|
||||||
{
|
{
|
||||||
Id = store.Id,
|
Id = store.Id,
|
||||||
Name = store.Name,
|
Name = store.Name,
|
||||||
@@ -201,6 +201,6 @@ internal static class MerchantMapping
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 将门店集合映射为 DTO 集合。
|
/// 将门店集合映射为 DTO 集合。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static IReadOnlyList<StoreDto> ToStoreDtos(IEnumerable<Store> stores)
|
public static IReadOnlyList<MerchantStoreDto> ToStoreDtos(IEnumerable<Store> stores)
|
||||||
=> stores.Select(ToStoreDto).ToList();
|
=> stores.Select(ToStoreDto).ToList();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user