using Mapster; using Microsoft.EntityFrameworkCore; using Persistence.Database.Model; using Persistence.Models; using Persistence.Repositories; namespace Persistence.Repository.Repositories; public class ChangeLogRepository : IChangeLogRepository where TDto : class, IChangeLogDto, new() where TChangeLogDto : ChangeLogDto { private DbContext db; public ChangeLogRepository(DbContext db) { this.db = db; } public Task Clear(int idUser, CancellationToken token) { throw new NotImplementedException(); } public Task ClearAndInsertRange(int idUser, IEnumerable dtos, CancellationToken token) { throw new NotImplementedException(); } public Task> GetChangeLogForDate(DateTimeOffset? updateFrom, CancellationToken token) { throw new NotImplementedException(); } public Task> GetCurrent(DateTimeOffset moment, CancellationToken token) { throw new NotImplementedException(); } public Task> GetDatesChange(CancellationToken token) { throw new NotImplementedException(); } public Task> GetGtDate(DateTimeOffset dateBegin, CancellationToken token) { throw new NotImplementedException(); } public Task InsertRange(Guid idUser, IEnumerable dtos, CancellationToken token) { var entity = new ChangeLog() { Value = dtos, Creation = DateTimeOffset.UtcNow, Id = idUser, IdAuthor = idUser, IdDiscriminator = new Guid(), IdEditor = idUser }; entity.Id = idUser; db.Set().Add(entity); var result = db.SaveChangesAsync(token); return result; } public Task MarkAsDeleted(int idUser, IEnumerable ids, CancellationToken token) { throw new NotImplementedException(); } public Task UpdateOrInsertRange(int idUser, IEnumerable dtos, CancellationToken token) { throw new NotImplementedException(); } public Task UpdateRange(int idUser, IEnumerable dtos, CancellationToken token) { throw new NotImplementedException(); } }