using Store.Users.Entities; using YourNamespace; namespace Store.Users.Behaviors; /// 需要账户积分消费检查的请求。 public interface IAccountConsumptionRequest { string? UserName { get; } AccountConsumptionContext? ConsumptionContext { get; set; } ConsumptionQuote CalculateConsumption(UserEntity user); } /// 需要检查商铺归属的请求,与是否消费无关。 public interface IShopOwnershipRequest { string UserName { get; } string ShopId { get; } ShopEntity? OwnedShop { get; set; } } public sealed record ConsumptionQuote(decimal Amount, decimal UnitPrice); public sealed record AccountConsumptionContext(UserEntity User, UserEntity Actor, ConsumptionQuote Quote);