feat: add basic schedule data models

This commit is contained in:
Polianin Nikita 2024-01-07 02:00:00 +03:00
parent 0f5c0bae76
commit 4eecc19f4f
10 changed files with 132 additions and 0 deletions

14
Domain/Schedule/Campus.cs Normal file
View File

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

15
Domain/Schedule/Day.cs Normal file
View File

@ -0,0 +1,15 @@
using System;
namespace Mirea.Api.DataAccess.Domain.Schedule;
public class Day
{
public int Id { get; set; }
public DayOfWeek Index { get; set; }
public int PairNumber { get; set; }
public int LessonId { get; set; }
public Lesson? Lesson { get; set; }
public int GroupId { get; set; }
public Group? Group { get; set; }
}

View File

@ -0,0 +1,13 @@
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; }
}

13
Domain/Schedule/Group.cs Normal file
View File

@ -0,0 +1,13 @@
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<Day>? Days { get; set; }
}

View File

@ -0,0 +1,13 @@
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 List<ProfessorToLesson>? ProfessorToLessons { get; set; }
public int CampusId { get; set; }
public Campus? Campus { get; set; }
}

14
Domain/Schedule/Lesson.cs Normal file
View File

@ -0,0 +1,14 @@
using System.Collections.Generic;
namespace Mirea.Api.DataAccess.Domain.Schedule;
public class Lesson
{
public int Id { get; set; }
public bool IsEven { get; set; }
public required string Discipline { get; set; }
public List<LessonToTypeOfOccupation>? TypeOfOccupations { get; set; }
public List<ProfessorToLesson>? ProfessorToLesson { get; set; }
public Day? Day { get; set; }
}

View File

@ -0,0 +1,11 @@
namespace Mirea.Api.DataAccess.Domain.Schedule;
public class LessonToTypeOfOccupation
{
public int Id { get; set; }
public int LessonId { get; set; }
public Lesson? Lesson { get; set; }
public int TypeOfOccupationId { get; set; }
public TypeOfOccupation? TypeOfOccupation { get; set; }
}

View File

@ -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<ProfessorToLesson>? ProfessorToLesson { get; set; }
}

View File

@ -0,0 +1,15 @@
namespace Mirea.Api.DataAccess.Domain.Schedule;
public class ProfessorToLesson
{
public int Id { get; set; }
public string? LinkToMeet { 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; }
}

View File

@ -0,0 +1,12 @@
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 string? FullName { get; set; }
public List<LessonToTypeOfOccupation>? Lessons { get; set; }
}