Files
TakeoutSaaS.TenantApi/src/Application/TakeoutSaaS.Application/App/Tenants/Commands/UpdateTenantPackageCommand.cs

107 lines
2.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using MediatR;
using TakeoutSaaS.Application.App.Tenants.Dto;
using TakeoutSaaS.Domain.Tenants.Enums;
namespace TakeoutSaaS.Application.App.Tenants.Commands;
/// <summary>
/// 更新租户套餐命令。
/// </summary>
public sealed record UpdateTenantPackageCommand : IRequest<TenantPackageDto?>
{
/// <summary>
/// 套餐 ID。
/// </summary>
public long TenantPackageId { get; init; }
/// <summary>
/// 套餐名称。
/// </summary>
public string Name { get; init; } = string.Empty;
/// <summary>
/// 套餐描述。
/// </summary>
public string? Description { get; init; }
/// <summary>
/// 套餐类型。
/// </summary>
public TenantPackageType PackageType { get; init; } = TenantPackageType.Standard;
/// <summary>
/// 月付价格。
/// </summary>
public decimal? MonthlyPrice { get; init; }
/// <summary>
/// 年付价格。
/// </summary>
public decimal? YearlyPrice { get; init; }
/// <summary>
/// 最大门店数。
/// </summary>
public int? MaxStoreCount { get; init; }
/// <summary>
/// 最大账号数。
/// </summary>
public int? MaxAccountCount { get; init; }
/// <summary>
/// 存储上限GB
/// </summary>
public int? MaxStorageGb { get; init; }
/// <summary>
/// 短信额度。
/// </summary>
public int? MaxSmsCredits { get; init; }
/// <summary>
/// 配送单上限。
/// </summary>
public int? MaxDeliveryOrders { get; init; }
/// <summary>
/// 权益明细 JSON。
/// </summary>
public string? FeaturePoliciesJson { get; init; }
/// <summary>
/// 是否仍启用(平台控制)。
/// </summary>
public bool IsActive { get; init; } = true;
/// <summary>
/// 是否对外可见(展示页/套餐列表可见性)。
/// </summary>
public bool IsPublicVisible { get; init; } = true;
/// <summary>
/// 是否允许新租户购买/选择(仅影响新购)。
/// </summary>
public bool IsAllowNewTenantPurchase { get; init; } = true;
/// <summary>
/// 发布状态(草稿/已发布)。
/// </summary>
public TenantPackagePublishStatus? PublishStatus { get; init; }
/// <summary>
/// 是否推荐展示(运营推荐标识)。
/// </summary>
public bool IsRecommended { get; init; }
/// <summary>
/// 套餐标签(用于展示与对比页)。
/// </summary>
public string[] Tags { get; init; } = [];
/// <summary>
/// 展示排序,数值越小越靠前。
/// </summary>
public int SortOrder { get; init; } = 0;
}