feat(marketing): add full reduction campaign api module
All checks were successful
Build and Deploy TenantApi + SkuWorker / build-and-deploy (push) Successful in 1m50s
All checks were successful
Build and Deploy TenantApi + SkuWorker / build-and-deploy (push) Successful in 1m50s
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
using TakeoutSaaS.Domain.Coupons.Entities;
|
||||
using TakeoutSaaS.Domain.Coupons.Enums;
|
||||
|
||||
namespace TakeoutSaaS.Domain.Coupons.Repositories;
|
||||
|
||||
/// <summary>
|
||||
/// 营销活动仓储契约。
|
||||
/// </summary>
|
||||
public interface IPromotionCampaignRepository
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询租户下指定活动类型的活动列表。
|
||||
/// </summary>
|
||||
Task<IReadOnlyList<PromotionCampaign>> GetByPromotionTypeAsync(
|
||||
long tenantId,
|
||||
PromotionType promotionType,
|
||||
CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 查询活动详情。
|
||||
/// </summary>
|
||||
Task<PromotionCampaign?> FindByIdAsync(
|
||||
long campaignId,
|
||||
long tenantId,
|
||||
PromotionType promotionType,
|
||||
CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 新增活动。
|
||||
/// </summary>
|
||||
Task AddAsync(PromotionCampaign campaign, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 更新活动。
|
||||
/// </summary>
|
||||
Task UpdateAsync(PromotionCampaign campaign, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 删除活动。
|
||||
/// </summary>
|
||||
Task DeleteAsync(PromotionCampaign campaign, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// 提交变更。
|
||||
/// </summary>
|
||||
Task SaveChangesAsync(CancellationToken cancellationToken = default);
|
||||
}
|
||||
Reference in New Issue
Block a user