refactor: move database-related projects to separate folder

This commit is contained in:
2024-05-29 07:49:42 +03:00
parent 081c814036
commit bf3a9d4b36
74 changed files with 5 additions and 43 deletions
Application/Common/Mappings
SqlData
Application
Application.csproj
Common
Cqrs
DependencyInjection.cs
Interfaces/DbContexts
Domain

@ -0,0 +1,14 @@
using System.Collections.Generic;
namespace Mirea.Api.DataAccess.Domain.Schedule;
public class Campus
{
public int Id { get; set; }
public required string CodeName { get; set; }
public string? FullName { get; set; }
public string? Address { get; set; }
public List<Faculty>? Faculties { get; set; }
public List<LectureHall>? LectureHalls { get; set; }
}

@ -0,0 +1,11 @@
using System.Collections.Generic;
namespace Mirea.Api.DataAccess.Domain.Schedule;
public class Discipline
{
public int Id { get; set; }
public required string Name { get; set; }
public List<Lesson>? Lessons { get; set; }
}

@ -0,0 +1,14 @@
using System.Collections.Generic;
namespace Mirea.Api.DataAccess.Domain.Schedule;
public class Faculty
{
public int Id { get; set; }
public required string Name { get; set; }
public int? CampusId { get; set; }
public Campus? Campus { get; set; }
public List<Group>? Groups { get; set; }
}

@ -0,0 +1,14 @@
using System.Collections.Generic;
namespace Mirea.Api.DataAccess.Domain.Schedule;
public class Group
{
public int Id { get; set; }
public required string Name { get; set; }
public int? FacultyId { get; set; }
public Faculty? Faculty { get; set; }
public List<Lesson>? Lessons { get; set; }
}

@ -0,0 +1,14 @@
using System.Collections.Generic;
namespace Mirea.Api.DataAccess.Domain.Schedule;
public class LectureHall
{
public int Id { get; set; }
public required string Name { get; set; }
public int CampusId { get; set; }
public Campus? Campus { get; set; }
public List<LessonAssociation>? LessonAssociations { get; set; }
}

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
namespace Mirea.Api.DataAccess.Domain.Schedule;
public class Lesson
{
public int Id { get; set; }
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 DisciplineId { get; set; }
public Discipline? Discipline { get; set; }
public List<LessonAssociation>? LessonAssociations { get; set; }
public List<SpecificWeek>? SpecificWeeks { get; set; }
}

@ -0,0 +1,16 @@
namespace Mirea.Api.DataAccess.Domain.Schedule;
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; }
public Professor? Professor { get; set; }
public int? LectureHallId { get; set; }
public LectureHall? LectureHall { get; set; }
}

@ -0,0 +1,12 @@
using System.Collections.Generic;
namespace Mirea.Api.DataAccess.Domain.Schedule;
public class Professor
{
public int Id { get; set; }
public required string Name { get; set; }
public string? AltName { get; set; }
public List<LessonAssociation>? LessonAssociations { get; set; }
}

@ -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; }
}

@ -0,0 +1,11 @@
using System.Collections.Generic;
namespace Mirea.Api.DataAccess.Domain.Schedule;
public class TypeOfOccupation
{
public int Id { get; set; }
public required string ShortName { get; set; }
public List<LessonAssociation>? Lessons { get; set; }
}