Created endpoints to managed messages

This commit is contained in:
2026-03-05 17:22:36 +01:00
parent 2e868889fc
commit 9591fa1723
9 changed files with 131 additions and 2 deletions
@@ -0,0 +1,13 @@
using Ardalis.Specification;
using BeReadyBackend.Models;
namespace BeReadyBackend.Specifications.Messages;
public class GetMessageByGroupIdSpec : Specification<Message>
{
public GetMessageByGroupIdSpec(int groupId)
{
Query
.Where(x => x.GroupId == groupId);
}
}
@@ -0,0 +1,13 @@
using Ardalis.Specification;
using BeReadyBackend.Models;
namespace BeReadyBackend.Specifications.Messages;
public class GetMessageByIdSpec : SingleResultSpecification<Message>
{
public GetMessageByIdSpec(int id)
{
Query
.Where(x => x.Id == id);
}
}