diff --git a/ApiDto/Responses/Schedule/DisciplineScheduleResponse.cs b/ApiDto/Responses/Schedule/DisciplineScheduleResponse.cs index bf4a337..ffc5578 100644 --- a/ApiDto/Responses/Schedule/DisciplineScheduleResponse.cs +++ b/ApiDto/Responses/Schedule/DisciplineScheduleResponse.cs @@ -31,7 +31,7 @@ public class DisciplineScheduleInfo /// Gets or sets the type of occupation for the schedule entry. /// [Required] - public required string TypeOfOccupation { get; set; } + public required IEnumerable TypeOfOccupation { get; set; } /// /// Gets or sets the names of the group for the schedule entry. diff --git a/ApiDto/Responses/Schedule/GroupScheduleResponse.cs b/ApiDto/Responses/Schedule/GroupScheduleResponse.cs index 7fa13d1..c0a7f42 100644 --- a/ApiDto/Responses/Schedule/GroupScheduleResponse.cs +++ b/ApiDto/Responses/Schedule/GroupScheduleResponse.cs @@ -39,11 +39,34 @@ public class GroupScheduleInfo [Required] public required int DisciplineId { get; set; } + /// + /// Gets or sets exclude or include weeks for a specific discipline. + /// + /// + /// If is , then the values in show the weeks when there will be no discipline. + ///
+ /// If is , then the values in indicate the weeks during which a particular discipline will be studied. + ///
+ /// If is , then there are no specific + ///
+ /// + + public bool? IsExcludedWeeks { get; set; } + /// + /// The week numbers required for the correct display of the schedule. + ///
+ /// Whether there will be during the week or not depends on the property. + ///
+ /// + /// To get the current week's number, use other queries. + /// + public IEnumerable? Weeks { get; set; } + /// /// Gets or sets the type of occupation for the schedule entry. /// [Required] - public required string TypeOfOccupation { get; set; } + public required IEnumerable TypeOfOccupations { get; set; } /// /// Gets or sets the names of the lecture halls for the schedule entry. diff --git a/ApiDto/Responses/Schedule/LectureHallScheduleResponse.cs b/ApiDto/Responses/Schedule/LectureHallScheduleResponse.cs index 369a8f5..84adb3c 100644 --- a/ApiDto/Responses/Schedule/LectureHallScheduleResponse.cs +++ b/ApiDto/Responses/Schedule/LectureHallScheduleResponse.cs @@ -39,11 +39,34 @@ public class LectureHallScheduleInfo [Required] public required int DisciplineId { get; set; } + /// + /// Gets or sets exclude or include weeks for a specific discipline. + /// + /// + /// If is , then the values in show the weeks when there will be no discipline. + ///
+ /// If is , then the values in indicate the weeks during which a particular discipline will be studied. + ///
+ /// If is , then there are no specific + ///
+ /// + + public bool? IsExcludedWeeks { get; set; } + /// + /// The week numbers required for the correct display of the schedule. + ///
+ /// Whether there will be during the week or not depends on the property. + ///
+ /// + /// To get the current week's number, use other queries. + /// + public IEnumerable? Weeks { get; set; } + /// /// Gets or sets the type of occupation for the schedule entry. /// [Required] - public required string TypeOfOccupation { get; set; } + public required IEnumerable TypeOfOccupations { get; set; } /// /// Gets or sets the names of the group for the schedule entry. diff --git a/ApiDto/Responses/Schedule/ProfessorScheduleResponse.cs b/ApiDto/Responses/Schedule/ProfessorScheduleResponse.cs index 3a53ebf..b25711e 100644 --- a/ApiDto/Responses/Schedule/ProfessorScheduleResponse.cs +++ b/ApiDto/Responses/Schedule/ProfessorScheduleResponse.cs @@ -39,11 +39,34 @@ public class ProfessorScheduleInfo [Required] public required int DisciplineId { get; set; } + /// + /// Gets or sets exclude or include weeks for a specific discipline. + /// + /// + /// If is , then the values in show the weeks when there will be no discipline. + ///
+ /// If is , then the values in indicate the weeks during which a particular discipline will be studied. + ///
+ /// If is , then there are no specific + ///
+ /// + + public bool? IsExcludedWeeks { get; set; } + /// + /// The week numbers required for the correct display of the schedule. + ///
+ /// Whether there will be during the week or not depends on the property. + ///
+ /// + /// To get the current week's number, use other queries. + /// + public IEnumerable? Weeks { get; set; } + /// /// Gets or sets the type of occupation for the schedule entry. /// [Required] - public required string TypeOfOccupation { get; set; } + public required IEnumerable TypeOfOccupations { get; set; } /// /// Gets or sets the names of the group for the schedule entry. diff --git a/ApiDto/Responses/Schedule/ScheduleResponse.cs b/ApiDto/Responses/Schedule/ScheduleResponse.cs index 2a03178..599cc3e 100644 --- a/ApiDto/Responses/Schedule/ScheduleResponse.cs +++ b/ApiDto/Responses/Schedule/ScheduleResponse.cs @@ -39,11 +39,34 @@ public class ScheduleResponse [Required] public required int DisciplineId { get; set; } + /// + /// Gets or sets exclude or include weeks for a specific discipline. + /// + /// + /// If is , then the values in show the weeks when there will be no discipline. + ///
+ /// If is , then the values in indicate the weeks during which a particular discipline will be studied. + ///
+ /// If is , then there are no specific + ///
+ /// + + public bool? IsExcludedWeeks { get; set; } + /// + /// The week numbers required for the correct display of the schedule. + ///
+ /// Whether there will be during the week or not depends on the property. + ///
+ /// + /// To get the current week's number, use other queries. + /// + public IEnumerable? Weeks { get; set; } + /// /// Gets or sets the type of occupation for the schedule entry. /// [Required] - public required string TypeOfOccupation { get; set; } + public required IEnumerable TypeOfOccupations { get; set; } /// /// Gets or sets the name of the group for the schedule entry. diff --git a/Application/Cqrs/Schedule/Queries/GetScheduleList/GetScheduleListQueryHandler.cs b/Application/Cqrs/Schedule/Queries/GetScheduleList/GetScheduleListQueryHandler.cs index ba08003..63a8a4d 100644 --- a/Application/Cqrs/Schedule/Queries/GetScheduleList/GetScheduleListQueryHandler.cs +++ b/Application/Cqrs/Schedule/Queries/GetScheduleList/GetScheduleListQueryHandler.cs @@ -11,15 +11,7 @@ public class GetScheduleListQueryHandler(ILessonDbContext dbContext) : IRequestH { public async Task Handle(GetScheduleListQuery request, CancellationToken cancellationToken) { - var query = dbContext.Lessons.Include(l => l.LessonAssociations) - .ThenInclude(la => la.LectureHall) - .ThenInclude(lh => lh!.Campus) - .Include(l => l.LessonAssociations) - .ThenInclude(la => la.Professor) - .Include(l => l.Group) - .Include(l => l.TypeOfOccupation) - .Include(l => l.Discipline) - .AsQueryable(); + var query = dbContext.Lessons.AsQueryable(); if (request.IsEven != null) query = query.Where(l => l.IsEven == request.IsEven); @@ -39,18 +31,33 @@ public class GetScheduleListQueryHandler(ILessonDbContext dbContext) : IRequestH l.LessonAssociations!.Any(la => la.ProfessorId != null && request.ProfessorIds.Contains(la.ProfessorId.Value))); - var data = await query.ToArrayAsync(cancellationToken); + var data = await query + .Include(lesson => lesson.Discipline!) + .Include(lesson => lesson.SpecificWeeks) + .Include(lesson => lesson.Group!) + .Include(lesson => lesson.LessonAssociations!) + .ThenInclude(lessonAssociation => lessonAssociation.TypeOfOccupation!) + .Include(lesson => lesson.LessonAssociations!) + .ThenInclude(lessonAssociation => lessonAssociation.Professor) + .Include(lesson => lesson.LessonAssociations!) + .ThenInclude(lessonAssociation => lessonAssociation.LectureHall) + .ThenInclude(lectureHall => lectureHall!.Campus).ToListAsync(cancellationToken); var result = data.Select(l => new ScheduleLookupDto() { DayOfWeek = l.DayOfWeek, PairNumber = l.PairNumber, IsEven = l.IsEven, - TypeOfOccupation = l.TypeOfOccupation!.ShortName, + TypeOfOccupations = l.LessonAssociations! + .Where(la => !string.IsNullOrEmpty(la.TypeOfOccupation?.ShortName)) + .Select(la => la.TypeOfOccupation!.ShortName), Discipline = l.Discipline!.Name, DisciplineId = l.DisciplineId, + IsExcludedWeeks = l.IsExcludedWeeks, + Weeks = l.SpecificWeeks?.Select(w => w.WeekNumber), + Group = l.Group!.Name, GroupId = l.GroupId, @@ -68,7 +75,6 @@ public class GetScheduleListQueryHandler(ILessonDbContext dbContext) : IRequestH .Where(la => la.LectureHall?.Campus != null) .Select(la => la.LectureHall?.CampusId), - Professors = l.LessonAssociations! .Where(la => !string.IsNullOrEmpty(la.Professor?.Name)) .Select(la => la.Professor?.Name), diff --git a/Application/Cqrs/Schedule/Queries/GetScheduleList/ScheduleLookupDto.cs b/Application/Cqrs/Schedule/Queries/GetScheduleList/ScheduleLookupDto.cs index bd3808f..b7a3802 100644 --- a/Application/Cqrs/Schedule/Queries/GetScheduleList/ScheduleLookupDto.cs +++ b/Application/Cqrs/Schedule/Queries/GetScheduleList/ScheduleLookupDto.cs @@ -34,9 +34,14 @@ public class ScheduleLookupDto public required int DisciplineId { get; set; } /// - /// Gets or sets the type of occupation. + /// Gets or sets exclude or include weeks for a specific discipline. /// - public required string TypeOfOccupation { get; set; } + public bool? IsExcludedWeeks { get; set; } + + /// + /// The week numbers required for the correct display of the schedule. + /// + public IEnumerable? Weeks { get; set; } /// /// Gets or sets the name of the group. @@ -48,6 +53,11 @@ public class ScheduleLookupDto /// public required int GroupId { get; set; } + /// + /// Gets or sets the type of occupation. + /// + public required IEnumerable TypeOfOccupations { get; set; } + /// /// Gets or sets the names of the lecture halls. /// diff --git a/Application/Interfaces/DbContexts/Schedule/ISpecificWeekDbContext.cs b/Application/Interfaces/DbContexts/Schedule/ISpecificWeekDbContext.cs new file mode 100644 index 0000000..a58115c --- /dev/null +++ b/Application/Interfaces/DbContexts/Schedule/ISpecificWeekDbContext.cs @@ -0,0 +1,9 @@ +using Microsoft.EntityFrameworkCore; +using Mirea.Api.DataAccess.Domain.Schedule; + +namespace Mirea.Api.DataAccess.Application.Interfaces.DbContexts.Schedule; + +public interface ISpecificWeekDbContext : IDbContextBase +{ + DbSet SpecificWeeks { get; set; } +} \ No newline at end of file diff --git a/Domain/Schedule/Lesson.cs b/Domain/Schedule/Lesson.cs index 3ff5e52..e854d3e 100644 --- a/Domain/Schedule/Lesson.cs +++ b/Domain/Schedule/Lesson.cs @@ -9,13 +9,13 @@ public class Lesson public bool IsEven { get; set; } public DayOfWeek DayOfWeek { get; set; } public int PairNumber { get; set; } + public bool? IsExcludedWeeks { get; set; } public int GroupId { get; set; } public Group? Group { get; set; } - public int TypeOfOccupationId { get; set; } - public TypeOfOccupation? TypeOfOccupation { get; set; } public int DisciplineId { get; set; } public Discipline? Discipline { get; set; } public List? LessonAssociations { get; set; } + public List? SpecificWeeks { get; set; } } \ No newline at end of file diff --git a/Domain/Schedule/LessonAssociation.cs b/Domain/Schedule/LessonAssociation.cs index 89b5651..e101bdd 100644 --- a/Domain/Schedule/LessonAssociation.cs +++ b/Domain/Schedule/LessonAssociation.cs @@ -5,6 +5,8 @@ public class LessonAssociation public int Id { get; set; } public string? LinkToMeet { get; set; } + public int TypeOfOccupationId { get; set; } + public TypeOfOccupation? TypeOfOccupation { get; set; } public int LessonId { get; set; } public Lesson? Lesson { get; set; } public int? ProfessorId { get; set; } diff --git a/Domain/Schedule/SpecificWeek.cs b/Domain/Schedule/SpecificWeek.cs new file mode 100644 index 0000000..b0adf31 --- /dev/null +++ b/Domain/Schedule/SpecificWeek.cs @@ -0,0 +1,10 @@ +namespace Mirea.Api.DataAccess.Domain.Schedule; + +public class SpecificWeek +{ + public int Id { get; set; } + public int WeekNumber { get; set; } + + public int LessonId { get; set; } + public Lesson? Lesson { get; set; } +} \ No newline at end of file diff --git a/Domain/Schedule/TypeOfOccupation.cs b/Domain/Schedule/TypeOfOccupation.cs index a2152a8..4a52a4a 100644 --- a/Domain/Schedule/TypeOfOccupation.cs +++ b/Domain/Schedule/TypeOfOccupation.cs @@ -6,7 +6,6 @@ public class TypeOfOccupation { public int Id { get; set; } public required string ShortName { get; set; } - public string? FullName { get; set; } - public List? Lessons { get; set; } + public List? Lessons { get; set; } } \ No newline at end of file diff --git a/Endpoint/Controllers/V1/ScheduleController.cs b/Endpoint/Controllers/V1/ScheduleController.cs index 43b47ad..1500efa 100644 --- a/Endpoint/Controllers/V1/ScheduleController.cs +++ b/Endpoint/Controllers/V1/ScheduleController.cs @@ -27,10 +27,10 @@ public class ScheduleController(IMediator mediator) : BaseControllerV1 public async Task>> Get([FromBody] ScheduleRequest request) { - if ((request.Groups == null || !request.Groups.Any()) && - (request.Disciplines == null || !request.Disciplines.Any()) && - (request.Professors == null || !request.Professors.Any()) && - (request.LectureHalls == null || !request.LectureHalls.Any())) + if ((request.Groups == null || request.Groups.Length == 0) && + (request.Disciplines == null || request.Disciplines.Length == 0) && + (request.Professors == null || request.Professors.Length == 0) && + (request.LectureHalls == null || request.LectureHalls.Length == 0)) { return BadRequest(new ErrorResponse() { @@ -60,7 +60,9 @@ public class ScheduleController(IMediator mediator) : BaseControllerV1 IsEven = s.IsEven, Discipline = s.Discipline, DisciplineId = s.DisciplineId, - TypeOfOccupation = s.TypeOfOccupation, + IsExcludedWeeks = s.IsExcludedWeeks, + Weeks = s.Weeks, + TypeOfOccupations = s.TypeOfOccupations, Group = s.Group, GroupId = s.GroupId, LectureHalls = s.LectureHalls, @@ -117,7 +119,9 @@ public class ScheduleController(IMediator mediator) : BaseControllerV1 IsEven = g.IsEven, Discipline = g.Discipline, DisciplineId = g.DisciplineId, - TypeOfOccupation = g.TypeOfOccupation, + IsExcludedWeeks = g.IsExcludedWeeks, + Weeks = g.Weeks, + TypeOfOccupations = g.TypeOfOccupations, LectureHalls = g.LectureHalls, LectureHallsId = g.LectureHallsId, Professors = g.Professors, @@ -176,7 +180,9 @@ public class ScheduleController(IMediator mediator) : BaseControllerV1 IsEven = p.IsEven, Discipline = p.Discipline, DisciplineId = p.DisciplineId, - TypeOfOccupation = p.TypeOfOccupation, + IsExcludedWeeks = p.IsExcludedWeeks, + Weeks = p.Weeks, + TypeOfOccupations = p.TypeOfOccupations, Group = p.Group, GroupId = p.GroupId, LectureHalls = p.LectureHalls, @@ -235,7 +241,9 @@ public class ScheduleController(IMediator mediator) : BaseControllerV1 IsEven = l.IsEven, Discipline = l.Discipline, DisciplineId = l.DisciplineId, - TypeOfOccupation = l.TypeOfOccupation, + IsExcludedWeeks = l.IsExcludedWeeks, + Weeks = l.Weeks, + TypeOfOccupations = l.TypeOfOccupations, Group = l.Group, GroupId = l.GroupId, Professors = l.Professors, @@ -273,7 +281,7 @@ public class ScheduleController(IMediator mediator) : BaseControllerV1 IsEven = isEven, DisciplineIds = [id], GroupIds = groups, - LectureHallIds = [id], + LectureHallIds = lectureHalls, ProfessorIds = professors })).Schedules; @@ -288,7 +296,7 @@ public class ScheduleController(IMediator mediator) : BaseControllerV1 DayOfWeek = d.DayOfWeek, PairNumber = d.PairNumber, IsEven = d.IsEven, - TypeOfOccupation = d.TypeOfOccupation, + TypeOfOccupation = d.TypeOfOccupations, Group = d.Group, GroupId = d.GroupId, LectureHalls = d.LectureHalls, diff --git a/Persistence/Contexts/Schedule/SpecificWeekDbContext.cs b/Persistence/Contexts/Schedule/SpecificWeekDbContext.cs new file mode 100644 index 0000000..b3601bd --- /dev/null +++ b/Persistence/Contexts/Schedule/SpecificWeekDbContext.cs @@ -0,0 +1,17 @@ +using Microsoft.EntityFrameworkCore; +using Mirea.Api.DataAccess.Application.Interfaces.DbContexts.Schedule; +using Mirea.Api.DataAccess.Domain.Schedule; +using Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Schedule; + +namespace Mirea.Api.DataAccess.Persistence.Contexts.Schedule; + +public class SpecificWeekDbContext(DbContextOptions options) : DbContext(options), ISpecificWeekDbContext +{ + public DbSet SpecificWeeks { get; set; } = null!; + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + modelBuilder.ApplyConfiguration(new SpecificWeekConfiguration()); + base.OnModelCreating(modelBuilder); + } +} \ No newline at end of file diff --git a/Persistence/DependencyInjection.cs b/Persistence/DependencyInjection.cs index 9ec71f1..ed6f554 100644 --- a/Persistence/DependencyInjection.cs +++ b/Persistence/DependencyInjection.cs @@ -43,6 +43,7 @@ public static class DependencyInjection services.AddDbContext(dbConfig); services.AddDbContext(dbConfig); services.AddDbContext(dbConfig); + services.AddDbContext(dbConfig); services.AddDbContext(dbConfig); } @@ -58,6 +59,7 @@ public static class DependencyInjection services.AddScoped(provider => provider.GetService()!); services.AddScoped(provider => provider.GetService()!); services.AddScoped(provider => provider.GetService()!); + services.AddScoped(provider => provider.GetService()!); return services; } diff --git a/Persistence/EntityTypeConfigurations/Schedule/LessonAssociationConfiguration.cs b/Persistence/EntityTypeConfigurations/Schedule/LessonAssociationConfiguration.cs index 44152dd..c9ecb8c 100644 --- a/Persistence/EntityTypeConfigurations/Schedule/LessonAssociationConfiguration.cs +++ b/Persistence/EntityTypeConfigurations/Schedule/LessonAssociationConfiguration.cs @@ -18,6 +18,8 @@ public class LessonAssociationConfiguration : IEntityTypeConfiguration l.LessonId).HasColumnType("INTEGER").IsRequired(); builder.Property(l => l.ProfessorId).HasColumnType("INTEGER"); builder.Property(l => l.LectureHallId).HasColumnType("INTEGER"); + builder.Property(l => l.TypeOfOccupationId).HasColumnType("INTEGER").IsRequired(); + builder .HasOne(l => l.Lesson) @@ -36,5 +38,11 @@ public class LessonAssociationConfiguration : IEntityTypeConfiguration l.LessonAssociations) .HasForeignKey(l => l.LectureHallId) .OnDelete(DeleteBehavior.SetNull); + + builder + .HasOne(l => l.TypeOfOccupation) + .WithMany(t => t.Lessons) + .HasForeignKey(d => d.TypeOfOccupationId) + .OnDelete(DeleteBehavior.Cascade); } } \ No newline at end of file diff --git a/Persistence/EntityTypeConfigurations/Schedule/LessonConfiguration.cs b/Persistence/EntityTypeConfigurations/Schedule/LessonConfiguration.cs index a3e878a..8d9c8cd 100644 --- a/Persistence/EntityTypeConfigurations/Schedule/LessonConfiguration.cs +++ b/Persistence/EntityTypeConfigurations/Schedule/LessonConfiguration.cs @@ -13,27 +13,20 @@ public class LessonConfiguration : IEntityTypeConfiguration builder.HasIndex(l => l.Id).IsUnique(); builder.Property(l => l.Id).HasColumnType("INTEGER").IsRequired().ValueGeneratedOnAdd(); - builder.Property(l => l.IsEven).HasColumnType("BIT").IsRequired(); + builder.Property(l => l.IsEven).HasColumnType("BOOLEAN").IsRequired(); builder.Property(l => l.DayOfWeek).HasColumnType("INTEGER").IsRequired(); builder.Property(l => l.PairNumber).HasColumnType("INTEGER").IsRequired(); + builder.Property(l => l.IsExcludedWeeks).HasColumnType("BOOLEAN"); builder.Property(l => l.GroupId).HasColumnType("INTEGER").IsRequired(); - builder.Property(l => l.TypeOfOccupationId).HasColumnType("INTEGER").IsRequired(); builder.Property(l => l.DisciplineId).HasColumnType("INTEGER").IsRequired(); - builder .HasOne(l => l.Group) .WithMany(g => g.Lessons) .HasForeignKey(d => d.GroupId) .OnDelete(DeleteBehavior.Cascade); - builder - .HasOne(l => l.TypeOfOccupation) - .WithMany(t => t.Lessons) - .HasForeignKey(d => d.TypeOfOccupationId) - .OnDelete(DeleteBehavior.Cascade); - builder .HasOne(l => l.Discipline) .WithMany(d => d.Lessons) diff --git a/Persistence/EntityTypeConfigurations/Schedule/SpecificWeekConfiguration.cs b/Persistence/EntityTypeConfigurations/Schedule/SpecificWeekConfiguration.cs new file mode 100644 index 0000000..f4fc8a3 --- /dev/null +++ b/Persistence/EntityTypeConfigurations/Schedule/SpecificWeekConfiguration.cs @@ -0,0 +1,26 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata.Builders; +using Mirea.Api.DataAccess.Domain.Schedule; + +namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Schedule; + +public class SpecificWeekConfiguration : IEntityTypeConfiguration +{ + public void Configure(EntityTypeBuilder builder) + { + builder.ToTable(nameof(SpecificWeek)); + builder.HasKey(s => s.Id); + builder.HasIndex(s => s.Id).IsUnique(); + builder.Property(s => s.Id).HasColumnType("INTEGER").IsRequired().ValueGeneratedOnAdd(); + + builder.Property(s => s.WeekNumber).HasColumnType("INTEGER").IsRequired(); + + builder.Property(s => s.LessonId).HasColumnType("INTEGER").IsRequired(); + + builder + .HasOne(s => s.Lesson) + .WithMany(l => l.SpecificWeeks) + .HasForeignKey(s => s.LessonId) + .OnDelete(DeleteBehavior.Cascade); + } +} \ No newline at end of file diff --git a/Persistence/EntityTypeConfigurations/Schedule/TypeOfOccupationConfiguration.cs b/Persistence/EntityTypeConfigurations/Schedule/TypeOfOccupationConfiguration.cs index 82c0b61..5341a5a 100644 --- a/Persistence/EntityTypeConfigurations/Schedule/TypeOfOccupationConfiguration.cs +++ b/Persistence/EntityTypeConfigurations/Schedule/TypeOfOccupationConfiguration.cs @@ -14,6 +14,5 @@ public class TypeOfOccupationConfiguration : IEntityTypeConfiguration t.Id).HasColumnType("INTEGER").IsRequired().ValueGeneratedOnAdd(); builder.Property(t => t.ShortName).HasColumnType("TEXT").IsRequired().HasMaxLength(16); - builder.Property(t => t.FullName).HasColumnType("TEXT").HasMaxLength(64); } } \ No newline at end of file diff --git a/Persistence/UberDbContext.cs b/Persistence/UberDbContext.cs index 699cc49..ccd1877 100644 --- a/Persistence/UberDbContext.cs +++ b/Persistence/UberDbContext.cs @@ -15,6 +15,7 @@ public class UberDbContext(DbContextOptions options) : DbContext( public DbSet Lessons { get; set; } = null!; public DbSet Professors { get; set; } = null!; public DbSet TypeOfOccupations { get; set; } = null!; + public DbSet SpecificWeeks { get; set; } = null!; protected override void OnModelCreating(ModelBuilder modelBuilder) { @@ -27,6 +28,7 @@ public class UberDbContext(DbContextOptions options) : DbContext( modelBuilder.ApplyConfiguration(new ProfessorConfiguration()); modelBuilder.ApplyConfiguration(new LessonAssociationConfiguration()); modelBuilder.ApplyConfiguration(new TypeOfOccupationConfiguration()); + modelBuilder.ApplyConfiguration(new SpecificWeekConfiguration()); base.OnModelCreating(modelBuilder); }