mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 18:26:31 +00:00
add repository with mysql and entities
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Azaion.Repository\Azaion.Repository.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,58 @@
|
||||
using Azaion.Repository.DTO;
|
||||
|
||||
namespace Azaion.Video;
|
||||
|
||||
public interface IVideoManager
|
||||
{
|
||||
List<VideoDto> GetVideos();
|
||||
void OpenVideo(Guid mediaId);
|
||||
|
||||
void CreateAnnotation(Guid mediaId, DateTime time)
|
||||
{
|
||||
|
||||
}
|
||||
void FinishAnnotation(Guid mediaId);
|
||||
|
||||
// after video ends, refresh list of free to edit videos.
|
||||
// on attempt to open video, check whether it is already taken, if yes, then businessError, else take it to user
|
||||
//
|
||||
// Users
|
||||
// Guid Username Email PasswordHash PasswordSalt CreatedDate UpdatedDate
|
||||
//
|
||||
// Media
|
||||
// Guid Path UserId Status CreatedDate
|
||||
//
|
||||
// Annotations
|
||||
// Guid MediaId ImagePath LabelPath CreatedDate
|
||||
//
|
||||
// Sftp Changes crawler
|
||||
// Google Downloader
|
||||
//
|
||||
// Video_path User
|
||||
//
|
||||
// v01 NULL
|
||||
// v02 NULL
|
||||
// v03 NULL
|
||||
// v04 NULL
|
||||
// v05 user1
|
||||
// v06 user1
|
||||
// v07 user1
|
||||
// v08 NULL
|
||||
// v09 user2
|
||||
// v10 user3
|
||||
// v11 user3
|
||||
// v12 NULL
|
||||
// v13 user2
|
||||
// v14 NULL
|
||||
// v15
|
||||
// v16
|
||||
// v17
|
||||
// v18
|
||||
// v19
|
||||
// v20
|
||||
// v21
|
||||
// v22
|
||||
// v23
|
||||
// v24
|
||||
// v25
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user