-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from snax4a/feature/offers-api
Add offers api and inquiry email sender job
- Loading branch information
Showing
74 changed files
with
6,486 additions
and
158 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
src/Core/Application/Common/Exceptions/InternalServerException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 5 additions & 9 deletions
14
src/Core/Application/Exchange/Groups/SearchGroupsRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/Core/Application/Exchange/Groups/Specifications/GroupByIdSpec.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace FSH.WebApi.Application.Exchange.Groups.Specifications; | ||
|
||
public class GroupByIdSpec : Specification<Group, GroupDto>, ISingleResultSpecification | ||
{ | ||
public GroupByIdSpec(Guid id, Guid userId) => | ||
Query.Where(g => g.Id == id && g.CreatedBy == userId); | ||
} |
2 changes: 1 addition & 1 deletion
2
...xchange/Groups/GroupByNameAndOwnerSpec.cs → ...Specifications/GroupByNameAndOwnerSpec.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/Core/Application/Exchange/Groups/Specifications/SearchGroupsSpec.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace FSH.WebApi.Application.Exchange.Groups.Specifications; | ||
|
||
public class SearchGroupsSpec : EntitiesByPaginationFilterSpec<Group, GroupDto> | ||
{ | ||
public SearchGroupsSpec(SearchGroupsRequest request, Guid userId) | ||
: base(request) => Query | ||
.Where(g => g.CreatedBy == userId) | ||
.OrderBy(g => g.Name, !request.HasOrderBy()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using System.ComponentModel; | ||
|
||
namespace FSH.WebApi.Application.Exchange.Inquiries; | ||
|
||
public interface IInquirySenderJob : IScopedService | ||
{ | ||
[DisplayName("Send inquiry emails to all recipients of the inquiry.")] | ||
Task SendAsync(Guid inquiryId, Guid traderId, CancellationToken cancellationToken); | ||
} |
14 changes: 5 additions & 9 deletions
14
src/Core/Application/Exchange/Inquiries/SearchInquiriesRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/Core/Application/Exchange/Inquiries/Specifications/InquiryByIdAndTraderSpec.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace FSH.WebApi.Application.Exchange.Inquiries.Specifications; | ||
|
||
public class InquiryByIdAndTraderSpec : Specification<Inquiry, InquiryDetailsDto>, ISingleResultSpecification | ||
{ | ||
public InquiryByIdAndTraderSpec(Guid inquiryId, Guid traderId) => | ||
Query | ||
.Include(i => i.InquiryRecipients) | ||
.Where(i => i.Id == inquiryId && i.InquiryRecipients.Any(ir => ir.TraderId == traderId)); | ||
} |
10 changes: 10 additions & 0 deletions
10
src/Core/Application/Exchange/Inquiries/Specifications/InquiryDetailsSpec.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace FSH.WebApi.Application.Exchange.Inquiries.Specifications; | ||
|
||
public class InquiryDetailsSpec : Specification<Inquiry, InquiryDetailsDto>, ISingleResultSpecification | ||
{ | ||
public InquiryDetailsSpec(Guid id, Guid userId) => | ||
Query | ||
.Where(i => i.Id == id && i.CreatedBy == userId) | ||
.Include(i => i.Products) | ||
.Include(i => i.InquiryRecipients); | ||
} |
9 changes: 9 additions & 0 deletions
9
src/Core/Application/Exchange/Inquiries/Specifications/SearchInquiriesSpec.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace FSH.WebApi.Application.Exchange.Inquiries.Specifications; | ||
|
||
public class SearchInquiriesSpec : EntitiesByPaginationFilterSpec<Inquiry, InquiryDto> | ||
{ | ||
public SearchInquiriesSpec(SearchInquiriesRequest request, Guid userId) | ||
: base(request) => Query | ||
.Where(i => i.CreatedBy == userId) | ||
.OrderByDescending(i => i.ReferenceNumber, !request.HasOrderBy()); | ||
} |
6 changes: 6 additions & 0 deletions
6
src/Core/Application/Exchange/Inquiries/Specifications/UserInquiriesSpec.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace FSH.WebApi.Application.Exchange.Inquiries.Specifications; | ||
|
||
public class UserInquiriesSpec : Specification<Inquiry>, ISingleResultSpecification | ||
{ | ||
public UserInquiriesSpec(Guid userId) => Query.Where(i => i.CreatedBy == userId); | ||
} |
Oops, something went wrong.