Skip to content

Нестеренко Андрей Лаб. 1 Группа 6512#68

Open
MagGoldi wants to merge 2 commits intoitsecd:mainfrom
MagGoldi:main
Open

Нестеренко Андрей Лаб. 1 Группа 6512#68
MagGoldi wants to merge 2 commits intoitsecd:mainfrom
MagGoldi:main

Conversation

@MagGoldi
Copy link

@MagGoldi MagGoldi commented Mar 18, 2026

ФИО: Нестеренко Андрей
Номер группы: 6512
Номер лабораторной: 1
Номер варианта: 29
Краткое описание предметной области: Транспортное средство
Краткое описание добавленных фич: реализована модель данных, добавлен сервис генерации, сделан endpoint, добавлен кеш, оркестратор

image

@MagGoldi MagGoldi changed the title Main Нестеренко Андрей Лаб. 1 Группа 6512 Mar 18, 2026
Copy link

@Gwymlas Gwymlas left a comment

Choose a reason for hiding this comment

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

Переделать доменную область и правила генерации, сейчас не соответствует заданию

/// <summary>
/// Контроллер для генерации и получения характеристик транспортных средств
/// </summary>

Copy link

Choose a reason for hiding this comment

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

Убрать пустую строку

/// <param name="id">Идентификатор машины</param>
/// <param name="cancellationToken">Токен отмены</param>
[HttpGet("{id}")]
public async Task<ActionResult<Vehicle>> GetById([FromRoute] int id, CancellationToken cancellationToken)
Copy link

Choose a reason for hiding this comment

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

Добавить атрибут ProducesResponseType и можно типизировать id


public VehicleFaker()
{
var fuelTypes = new[] { "Бензин", "Дизель", "Электро", "Гибрид", "Газ" };
Copy link

Choose a reason for hiding this comment

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

Вынести это и ниже по коду справочники в private static readonly поля

}
}

public class CachedVehicleGeneratorService(
Copy link

Choose a reason for hiding this comment

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

Перенести в другой файл

.WithEndpoint("http", e => e.Port = 5179);

builder.AddProject<Projects.Client_Wasm>("client")
.WithReference(api)
Copy link

Choose a reason for hiding this comment

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

Не нужен .WithReference(api)

Comment on lines +8 to +17
public required int Id { get; set; }
public required string Brand { get; set; }
public required string Model { get; set; }
public required string RegistrationNumber { get; set; }
public required string OwnerName { get; set; }
public int Year { get; set; }
public decimal EngineVolume { get; set; }
public int Mileage { get; set; }
public required string FuelType { get; set; }
public decimal Price { get; set; }
Copy link

Choose a reason for hiding this comment

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

Добавить summary для свойств

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants