ISplitPresetService.cs
1,012 bytes
| 1 | using SplitApp.WebApp.Application.DTO; |
|---|---|
| 2 | using SplitApp.Modules.Trips.Domain.Entities; |
| 3 | using SplitApp.Modules.Trips.Domain.Enums; |
| 4 | using SplitApp.Modules.Expenses.Domain.Entities; |
| 5 | using SplitApp.Modules.Expenses.Domain.Enums; |
| 6 | |
| 7 | namespace SplitApp.WebApp.Application.Services; |
| 8 | |
| 9 | public interface ISplitPresetService |
| 10 | { |
| 11 | Task<List<SplitPresetBllDto>> GetByTripIdAsync(Guid tripId, Guid userId); // participant-only |
| 12 | Task<SplitPresetBllDto?> GetByIdAsync(Guid id, Guid userId); // participant-only |
| 13 | |
| 14 | Task<(SplitPresetBllDto? preset, string? errorCode)> CreateAsync(SplitPresetBllDto preset, |
| 15 | List<(Guid UserId, decimal? ShareWeight, decimal? Percentage)> members, Guid userId); // participant |
| 16 | Task<(bool success, string? errorCode)> UpdateAsync(Guid id, string name, ESplitMethod splitMethod, |
| 17 | List<(Guid UserId, decimal? ShareWeight, decimal? Percentage)> members, Guid userId); // participant |
| 18 | Task<(bool success, string? errorCode)> DeleteAsync(Guid id, Guid userId); // participant |
| 19 | } |
| 20 | |