Skip to content

Commit

Permalink
Adicionando tabela Qualis do Pondoc.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoura-dev committed Dec 13, 2023
1 parent 9eb03c3 commit 898e573
Show file tree
Hide file tree
Showing 10 changed files with 693 additions and 4 deletions.
4 changes: 2 additions & 2 deletions backend/Infrastructure/Repositories/ContexRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ public class ContexRepository : DbContext
public DbSet<StudentCourseEntity> StudentCourses { get; set; } = null!;
public DbSet<OrientationEntity> Orientations { get; set; } = null!;
public DbSet<ResearchLineEntity> ResearchLines { get; set; } = null!;
public DbSet<PondocQualisEntity> Qualis { get; set; } = null!;

/// <summary>
/// Initializes a new instance of the <see cref="ContexRepository"/> class with the specified options.
/// </summary>
/// <param name="options">The options for configuring the database context.</param>
public ContexRepository(DbContextOptions<ContexRepository> options)
: base(options)
{
}
{ }

/// <inheritdoc />
protected override void OnModelCreating(ModelBuilder modelBuilder)
Expand Down
7 changes: 7 additions & 0 deletions backend/Infrastructure/Repositories/IRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
using saga.Infrastructure.Repositories.Student;
using saga.Infrastructure.Repositories.StudentCourse;
using saga.Infrastructure.Repositories.User;
using saga.Infrastructure.Repositories.PondocQualis;


namespace saga.Infrastructure.Repositories
{
Expand Down Expand Up @@ -72,6 +74,11 @@ public interface IRepository
/// </summary>
IResearchLineRepository ResearchLine { get; }

/// <summary>
/// Gets the repository for Pondoc Qualis entities.
/// </summary>
IPondocQualisRepository PondocQualis { get; }

/// <summary>
/// Commits the pending changes asynchronously.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using saga.Models.Entities;

namespace saga.Infrastructure.Repositories.PondocQualis
{
/// <inheritdoc />
public interface IPondocQualisRepository : IBaseRepository<PondocQualisEntity>
{ }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System.Linq.Expressions;
using saga.Infrastructure.Extensions;
using saga.Models.Entities;
using Microsoft.EntityFrameworkCore;

namespace saga.Infrastructure.Repositories.PondocQualis
{
/// <inheritdoc />
public class PondocQualisRepository : BaseRepository<PondocQualisEntity>, IPondocQualisRepository
{
public PondocQualisRepository(ContexRepository dbContext) : base(dbContext)
{ }
}
}
5 changes: 5 additions & 0 deletions backend/Infrastructure/Repositories/Repository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using saga.Infrastructure.Repositories.Student;
using saga.Infrastructure.Repositories.StudentCourse;
using saga.Infrastructure.Repositories.User;
using saga.Infrastructure.Repositories.PondocQualis;

namespace saga.Infrastructure.Repositories
{
Expand Down Expand Up @@ -73,8 +74,12 @@ public Repository(ContexRepository? dbContext, IUserContext userContext)
/// <inheritdoc />
public IOrientationRepository Orientation => new OrientationRepository(_dbContext, _userContext);

/// <inheritdoc />
public IResearchLineRepository ResearchLine => new ResearchLineRepository(_dbContext);

/// <inheritdoc />
public IPondocQualisRepository PondocQualis => new PondocQualisRepository(_dbContext);

/// <inheritdoc />
public async Task<int> CommitAsync()
{
Expand Down
Loading

0 comments on commit 898e573

Please sign in to comment.