feat: update WorkshopEmbedding method and enhance EmployeeFaceEmbedding model with additional properties

This commit is contained in:
2025-11-06 10:02:11 +03:30
parent f4853b6f39
commit 22b67b344a
4 changed files with 106 additions and 44 deletions

View File

@@ -9,7 +9,7 @@ public class EmployeeFaceEmbeddingRepository : IEmployeeFaceEmbeddingRepository
public EmployeeFaceEmbeddingRepository(IMongoDatabase database)
{
_employeeFaceEmbeddings = database.GetCollection<EmployeeFaceEmbedding>("EmployeeFaceEmbeddings");
_employeeFaceEmbeddings = database.GetCollection<EmployeeFaceEmbedding>("EmployeeFaces");
}
public async Task CreateAsync(EmployeeFaceEmbedding employeeFaceEmbedding)
@@ -48,7 +48,7 @@ public class EmployeeFaceEmbeddingRepository : IEmployeeFaceEmbeddingRepository
public async Task<List<EmployeeFaceEmbedding>> GetByWorkshopIdsAsync(List<long> workshopIds)
{
return await _employeeFaceEmbeddings
.Find(x => workshopIds.Contains(x.WorkshopId))
.Find(x => workshopIds.First()==x.WorkshopId)
.ToListAsync();
}