refactor: 重命名商户门店DTO

This commit is contained in:
2026-01-05 10:43:04 +08:00
parent dd92968304
commit 6eea61264b
3 changed files with 5 additions and 5 deletions

View File

@@ -96,7 +96,7 @@ public sealed class MerchantDetailDto
/// <summary>
/// 门店列表。
/// </summary>
public IReadOnlyList<StoreDto> Stores { get; init; } = [];
public IReadOnlyList<MerchantStoreDto> Stores { get; init; } = [];
/// <summary>
/// 并发控制版本。

View File

@@ -7,7 +7,7 @@ namespace TakeoutSaaS.Application.App.Merchants.Dto;
/// <summary>
/// 商户详情门店 DTO。
/// </summary>
public sealed class StoreDto
public sealed class MerchantStoreDto
{
/// <summary>
/// 门店 ID。

View File

@@ -50,7 +50,7 @@ internal static class MerchantMapping
/// <summary>
/// 将商户实体映射为详情 DTO。
/// </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,
TenantId = merchant.TenantId,
@@ -150,7 +150,7 @@ internal static class MerchantMapping
/// <summary>
/// 将门店实体映射为 DTO。
/// </summary>
public static StoreDto ToStoreDto(Store store) => new()
public static MerchantStoreDto ToStoreDto(Store store) => new()
{
Id = store.Id,
Name = store.Name,
@@ -201,6 +201,6 @@ internal static class MerchantMapping
/// <summary>
/// 将门店集合映射为 DTO 集合。
/// </summary>
public static IReadOnlyList<StoreDto> ToStoreDtos(IEnumerable<Store> stores)
public static IReadOnlyList<MerchantStoreDto> ToStoreDtos(IEnumerable<Store> stores)
=> stores.Select(ToStoreDto).ToList();
}