add repository with mysql and entities

This commit is contained in:
Oleksandr Bezdieniezhnykh
2024-07-16 14:18:55 +03:00
parent 32c92fedf2
commit bfbfdf6658
18 changed files with 331 additions and 3 deletions
@@ -0,0 +1,36 @@
using Azaion.Repository;
using Azaion.Repository.DTO;
namespace Azaion.Video;
public class VideoManager(IDbFactory dbFactory) : IVideoManager
{
public List<VideoDto> GetVideos()
{
return dbFactory.Run(db => db.Medias
.Where(x => x.AnnotatorId != null)
.Select(x => new VideoDto
{
Id = x.Id,
Path = x.Path,
CreatedDate = x.CreatedDate,
MediaStatus = x.Status
})
.ToList());
}
public void OpenVideo(Guid mediaId)
{
throw new NotImplementedException();
}
public void OpenTestVideo()
{
}
public void FinishAnnotation(Guid mediaId)
{
throw new NotImplementedException();
}
}