增加Mediat Pip特性,并用实例来做一个demo
This commit is contained in:
1 parent
292cb8638c
commit
c9ac7412ab
19 files changed
+682
-108
No files matched your search
@@ -0,0 +1,23 @@
|
||||
using Store.Users.Entities;
|
||||
using YourNamespace;
|
||||
|
||||
namespace Store.Users.Behaviors;
|
||||
|
||||
/// <summary>需要账户积分消费检查的请求。</summary>
|
||||
public interface IAccountConsumptionRequest
|
||||
{
|
||||
string UserName { get; }
|
||||
AccountConsumptionContext? ConsumptionContext { get; set; }
|
||||
ConsumptionQuote CalculateConsumption(UserEntity user);
|
||||
}
|
||||
|
||||
/// <summary>需要检查商铺归属的请求,与是否消费无关。</summary>
|
||||
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, ConsumptionQuote Quote);
|
||||
Reference in new issue
Block a user