Skip to content

Conversation

@maeosha
Copy link

@maeosha maeosha commented Dec 21, 2025

ФИО: Ксеневич Максим Станиславович
Номер группы: 6412
Номер лабораторной: 3
Номер варианта: 10
Краткое описание предметной области: Поликилиника
Краткое описание добавленных фич: Добелены EfCore репозитории, DbContex, Aspire проект. Данные хранятся в MySql с оркестрацией через Aspire.

maeosha added 30 commits October 2, 2025 19:31
…patients, doctors, specializations, and appointments
- Removed IClinicDataBase interface and its implementation.
- Deleted DataSeed class for test data.
- Updated Program.cs to configure Entity Framework and database context.
- Created AnalyticsServices for analytics-related functionalities.
- Refactored AppointmentServices, DoctorServices, PatientServices, and SpecializationServices to use specific data interfaces.
- Updated appsettings for database connection strings and logging levels.
@maeosha maeosha changed the title Lab3 6412 Лаб.3 Ксеневич Максим Dec 21, 2025
@maeosha maeosha closed this Dec 21, 2025
@maeosha maeosha reopened this Dec 21, 2025
@github-actions github-actions bot added In progress Код в процессе проверки Lab 3 Лабораторная №3. ORM labels Dec 21, 2025
@github-actions github-actions bot requested a review from alxmcs December 21, 2025 11:37
Copy link
Contributor

@alxmcs alxmcs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Самый главный вопрос - где оркестратор?
image

Также со времен 2й лабы пропали инмемори репозитории. Если ты их ввел в свою архитектуру, будь добр поддерживать их до конца так же, как это делают все остальные студенты, которые сдавали 2 и 3 лабу отдельно.

@maeosha
Copy link
Author

maeosha commented Dec 21, 2025

Зачем поддерживать инмемори хранение, если смысл лабораторной работы как раз таки уйти от них?

@alxmcs
Copy link
Contributor

alxmcs commented Dec 21, 2025

Философскими вопросами стоило задаваться в начале семестра, а не в 20х числах декабря.

Уход от использования инмемори репозиториев не означает отказ от их поддержки. Интерфейсы инфраструктурного уровня проекта нужно было спроектировать так, чтобы они оставались совместимы как с хранением в памяти, так и с хранением данных в бд через ef core.

@maeosha
Copy link
Author

maeosha commented Dec 21, 2025

Так про дальнейшую поддержку инмемори репозиториев не было сказано ни слова в условиях лабораторной работы...

@maeosha maeosha requested a review from alxmcs December 21, 2025 20:40
Copy link
Contributor

@alxmcs alxmcs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Как-то поздно я, конечно, заинтересовался вопросом. Но почему вариант 10?
image

Когда должен быть 36
image

Предыдущие лабы, я, к сожалению, уже принял, так что заставлять тебя менять доменную область было бы нечестно. Но данную лабу я принимать не буду, пока не будет сменено СУБД, потому что по варианту должен быть Postgres, а не MySql.
image

Кстати, об отсутствии в условии лабораторных необходимости поддерживать инмемори репозитории.

@maeosha maeosha requested a review from alxmcs December 22, 2025 11:13
@maeosha
Copy link
Author

maeosha commented Dec 22, 2025

Пожалуйста сжальтесь, дайте возможность не возвращать мне инмемори репозитории, мне под них инфрастурктуру менять придется:(

@alxmcs
Copy link
Contributor

alxmcs commented Dec 23, 2025

Лол, нет

Copy link
Contributor

@alxmcs alxmcs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Проект обрастает функционалом, а лучше от этого никому не становится. В том числе и мне. К 4 лабораторной у меня, наверное, окончательно сосуды в мозгу лопнут.

Я уже несколько ревью подряд пишу о необходимости выделить dto в отдельную класслибу. Ты как планируешь реализовывать совершенно автономный и никак не связанный с апи сервером сервер генерации контрактов без отдельной либы с контрактами? Апи сервер в нем зареференсишь? А если бы нужно было писать фронтенд, ты бы в клиентском приложении сервер зареференсил?

Может быть, вместо бокса по переписке под конец семестра стоило начать писать код пораньше (и получше)?

/// </summary>
[ApiController]
[Route("api/specializations")]
public class SpecializationControllers(ISpecializationServices specializationServices) : BaseControllers<GetSpecializationDto, CreateSpecializationDto, UpdateSpecializationDto>(specializationServices);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Документации ни к методам контроллера
image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ни к контрактам нет

Comment on lines +4 to +6
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Потому что ее никто не билдит

builder.Services.AddAutoMapper(cfg => cfg.AddProfile<MappingProfile>());

builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

И не добавляет в сваггерген

Comment on lines +8 to +13
public class Specialization
{
/// <summary>
/// Gets or sets the id specialization.
/// </summary>
required public int Id { get; set; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ни при помощи атрибутов

/// </summary>
[ApiController]
[Route("api/analytics")]
public class AnalyticsController(AnalyticsServices testServices) : ControllerBase
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Контроллеры в проекте почему-то все проименованы во множественном числе

Comment on lines +9 to +17
/// <summary>
/// The full name of the patient for the appointment.
/// </summary>
public required string PatientFullName { get; set; }

/// <summary>
/// The full name of the doctor for the appointment.
/// </summary>
public required string DoctorFullName { get; set; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Почему для связи с другими сущностями тут дважды используется неуникальное поле, которое приведет к конфликтам и рассогласованности данных, я понятия не имею

Comment on lines +12 to +17
public int? PatientId { get; set; } = null;

/// <summary>
/// Optional: The ID of the doctor to update for the appointment.
/// </summary>
public int? DoctorId { get; set; } = null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Почему-то здесь здравый смысл все-таки одержал верх, а в CreateAppointmentDto - нет

@@ -0,0 +1,25 @@
using Clinic.Api.DTOs.Appointment;

namespace Clinic.Api.Interfaces.Services;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Весь семестр мы говорили о грамотной декомпозиции кода проекта, о разделении слоев, о логической связности, о domain-centered grouping

Не, зачем, тут будет папка "интерфейсы" и в ней будут валяться все интерфейсы 👍 👍 👍 👍

@@ -0,0 +1,52 @@
using Clinic.Models.Entities;

namespace Clinic.Application.Ports;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Архитектурная концепция портов-адаптеров никогда не подразумевала под собой помойку из интерфейсов в отдельной директории с названием "порты"

@alxmcs alxmcs added Approved Лабораторная зачтена and removed In progress Код в процессе проверки labels Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved Лабораторная зачтена Lab 3 Лабораторная №3. ORM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants