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