-
Notifications
You must be signed in to change notification settings - Fork 76
6412 Лаб.3 Ксеневич Максим #225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…d patients classes into a separate class
…Info. fix: add summary
…tors, specializations, and appointments
…patients, doctors, specializations, and appointments
…ls in the Clinic API
…e registrations and Swagger integration
…octor data retrieval in the Clinic API
…s to use base controller pattern
- 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clinic/Clinic.DataBase/EntityFramework/EfAppointmentDataBase.cs
Outdated
Show resolved
Hide resolved
|
Зачем поддерживать инмемори хранение, если смысл лабораторной работы как раз таки уйти от них? |
|
Философскими вопросами стоило задаваться в начале семестра, а не в 20х числах декабря. Уход от использования инмемори репозиториев не означает отказ от их поддержки. Интерфейсы инфраструктурного уровня проекта нужно было спроектировать так, чтобы они оставались совместимы как с хранением в памяти, так и с хранением данных в бд через ef core. |
|
Так про дальнейшую поддержку инмемори репозиториев не было сказано ни слова в условиях лабораторной работы... |
…ucture and functionality
alxmcs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Как-то поздно я, конечно, заинтересовался вопросом. Но почему вариант 10?

Предыдущие лабы, я, к сожалению, уже принял, так что заставлять тебя менять доменную область было бы нечестно. Но данную лабу я принимать не буду, пока не будет сменено СУБД, потому что по варианту должен быть Postgres, а не MySql.
![]()
Кстати, об отсутствии в условии лабораторных необходимости поддерживать инмемори репозитории.
…tructure and add Clinic.Application project
|
Пожалуйста сжальтесь, дайте возможность не возвращать мне инмемори репозитории, мне под них инфрастурктуру менять придется:( |
|
Лол, нет |
alxmcs
left a comment
There was a problem hiding this 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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ни к контрактам нет
| <TargetFramework>net8.0</TargetFramework> | ||
| <Nullable>enable</Nullable> | ||
| <ImplicitUsings>enable</ImplicitUsings> |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
И не добавляет в сваггерген
| public class Specialization | ||
| { | ||
| /// <summary> | ||
| /// Gets or sets the id specialization. | ||
| /// </summary> | ||
| required public int Id { get; set; } |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Контроллеры в проекте почему-то все проименованы во множественном числе
| /// <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; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Почему для связи с другими сущностями тут дважды используется неуникальное поле, которое приведет к конфликтам и рассогласованности данных, я понятия не имею
| 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; |
There was a problem hiding this comment.
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; | |||
There was a problem hiding this comment.
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; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Архитектурная концепция портов-адаптеров никогда не подразумевала под собой помойку из интерфейсов в отдельной директории с названием "порты"



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