Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Client.Wasm/Components/StudentCard.razor
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
</CardHeader>
<CardBody>
<UnorderedList Unstyled>
<UnorderedListItem>Номер <Strong>№X "Название лабораторной"</Strong></UnorderedListItem>
<UnorderedListItem>Вариант <Strong>№Х "Название варианта"</Strong></UnorderedListItem>
<UnorderedListItem>Выполнена <Strong>Фамилией Именем 65ХХ</Strong> </UnorderedListItem>
<UnorderedListItem><Link To="https://puginarug.com/">Ссылка на форк</Link></UnorderedListItem>
<UnorderedListItem>Номер <Strong>№1 «Кэширование»</Strong></UnorderedListItem>
<UnorderedListItem>Вариант <Strong>№4 «Кредитная заявка»</Strong></UnorderedListItem>
<UnorderedListItem>Выполнена <Strong>Горшениным Дмитрием 6511</Strong> </UnorderedListItem>
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

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

Grammatically this reads as feminine (“Выполнена”), while the sentence is about the work/assignment (“задание/лабораторная”) and is usually phrased as “Выполнено …”. Consider adjusting the wording to avoid the agreement error.

Suggested change
<UnorderedListItem>Выполнена <Strong>Горшениным Дмитрием 6511</Strong> </UnorderedListItem>
<UnorderedListItem>Выполнено <Strong>Горшениным Дмитрием 6511</Strong> </UnorderedListItem>

Copilot uses AI. Check for mistakes.
<UnorderedListItem><Link To="https://github.com/dmgorshenin/cloud-development?tab=readme-ov-file">Ссылка на форк</Link></UnorderedListItem>
</UnorderedList>
</CardBody>
</Card>
12 changes: 6 additions & 6 deletions Client.Wasm/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
Expand All @@ -12,26 +12,26 @@
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchBrowser": false,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "http://localhost:5127",
"applicationUrl": "http://localhost:5128",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchBrowser": false,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "https://localhost:7282;http://localhost:5127",
"applicationUrl": "https://localhost:7283;http://localhost:5128",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchBrowser": false,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
Expand Down
4 changes: 2 additions & 2 deletions Client.Wasm/wwwroot/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"BaseAddress": "https://localhost:7170/land-plot"
"BaseAddress": "https://localhost:7171/credit-application"
}
18 changes: 18 additions & 0 deletions CloudDevelopment.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ VisualStudioVersion = 17.14.36811.4
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Client.Wasm", "Client.Wasm\Client.Wasm.csproj", "{AE7EEA74-2FE0-136F-D797-854FD87E022A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CreditApplication.AppHost", "CreditApplication.AppHost\CreditApplication.AppHost.csproj", "{8D7BA58C-B453-616F-C170-8D20E1B277D5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CreditApplication.Generator", "CreditApplication.Generator\CreditApplication.Generator.csproj", "{795D187F-BDDB-12D5-574B-DB27A6FAA1B2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CreditApplication.ServiceDefaults", "CreditApplication.ServiceDefaults\CreditApplication.ServiceDefaults.csproj", "{3E99472D-C53C-A52E-DCDC-C663DE0B4459}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -15,6 +21,18 @@ Global
{AE7EEA74-2FE0-136F-D797-854FD87E022A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AE7EEA74-2FE0-136F-D797-854FD87E022A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AE7EEA74-2FE0-136F-D797-854FD87E022A}.Release|Any CPU.Build.0 = Release|Any CPU
{8D7BA58C-B453-616F-C170-8D20E1B277D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8D7BA58C-B453-616F-C170-8D20E1B277D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8D7BA58C-B453-616F-C170-8D20E1B277D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8D7BA58C-B453-616F-C170-8D20E1B277D5}.Release|Any CPU.Build.0 = Release|Any CPU
{795D187F-BDDB-12D5-574B-DB27A6FAA1B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{795D187F-BDDB-12D5-574B-DB27A6FAA1B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{795D187F-BDDB-12D5-574B-DB27A6FAA1B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{795D187F-BDDB-12D5-574B-DB27A6FAA1B2}.Release|Any CPU.Build.0 = Release|Any CPU
{3E99472D-C53C-A52E-DCDC-C663DE0B4459}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3E99472D-C53C-A52E-DCDC-C663DE0B4459}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3E99472D-C53C-A52E-DCDC-C663DE0B4459}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3E99472D-C53C-A52E-DCDC-C663DE0B4459}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
24 changes: 24 additions & 0 deletions CreditApplication.AppHost/CreditApplication.AppHost.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<Sdk Name="Aspire.AppHost.Sdk" Version="9.0.0" />

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsAspireHost>true</IsAspireHost>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Aspire.Hosting" Version="9.5.2" />
<PackageReference Include="Aspire.Hosting.AppHost" Version="9.5.2" />
<PackageReference Include="Aspire.Hosting.Redis" Version="9.5.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\CreditApplication.Generator\CreditApplication.Generator.csproj" />
<ProjectReference Include="..\Client.Wasm\Client.Wasm.csproj" />
</ItemGroup>

</Project>
13 changes: 13 additions & 0 deletions CreditApplication.AppHost/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
var builder = DistributedApplication.CreateBuilder(args);

var redis = builder.AddRedis("redis")
.WithRedisCommander();

var generator = builder.AddProject<Projects.CreditApplication_Generator>("generator")
.WithReference(redis)
.WithExternalHttpEndpoints();

builder.AddProject<Projects.Client_Wasm>("client")
.WithReference(generator);

builder.Build().Run();
29 changes: 29 additions & 0 deletions CreditApplication.AppHost/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"profiles": {
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:17170;http://localhost:15170",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_ENVIRONMENT": "Development",
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21170",
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22170"
}
},
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:15170",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_ENVIRONMENT": "Development",
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19170",
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20170"
}
}
}
}
9 changes: 9 additions & 0 deletions CreditApplication.AppHost/appsettings.Development.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"Aspire.Hosting.Dcp": "Warning"
}
}
}
9 changes: 9 additions & 0 deletions CreditApplication.AppHost/appsettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"Aspire.Hosting.Dcp": "Warning"
}
}
}
18 changes: 18 additions & 0 deletions CreditApplication.Generator/CreditApplication.Generator.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Aspire.StackExchange.Redis.DistributedCaching" Version="9.5.2" />
<PackageReference Include="Bogus" Version="35.6.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\CreditApplication.ServiceDefaults\CreditApplication.ServiceDefaults.csproj" />
</ItemGroup>

</Project>
57 changes: 57 additions & 0 deletions CreditApplication.Generator/Models/CreditApplicationModel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
namespace CreditApplication.Generator.Models;

/// <summary>
/// Модель кредитной заявки
/// </summary>
public class CreditApplicationModel
{
/// <summary>
/// Идентификатор в системе
/// </summary>
public int Id { get; set; }

/// <summary>
/// Тип кредита (Потребительский, Ипотека, Автокредит и т.д.)
/// </summary>
public string CreditType { get; set; } = string.Empty;

/// <summary>
/// Запрашиваемая сумма (округляется до 2 знаков)
/// </summary>
public decimal RequestedAmount { get; set; }

/// <summary>
/// Срок в месяцах
/// </summary>
public int TermInMonths { get; set; }

/// <summary>
/// Процентная ставка (не менее ставки ЦБ РФ, округляется до 2 знаков)
/// </summary>
public double InterestRate { get; set; }

/// <summary>
/// Дата подачи (не более 2 лет назад)
/// </summary>
public DateOnly ApplicationDate { get; set; }

/// <summary>
/// Необходимость страховки
/// </summary>
public bool InsuranceRequired { get; set; }

/// <summary>
/// Статус заявки (Новая, В обработке, Одобрена, Отклонена)
/// </summary>
public string Status { get; set; } = string.Empty;

/// <summary>
/// Дата решения (только для терминальных статусов)
/// </summary>
public DateOnly? DecisionDate { get; set; }

/// <summary>
/// Одобренная сумма (только для статуса "Одобрена", <= RequestedAmount)
/// </summary>
public decimal? ApprovedAmount { get; set; }
}
68 changes: 68 additions & 0 deletions CreditApplication.Generator/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
using CreditApplication.Generator.Services;
using CreditApplication.ServiceDefaults;
using Serilog;

var builder = WebApplication.CreateBuilder(args);

builder.AddServiceDefaults();

builder.AddRedisDistributedCache("redis");

builder.Services.AddSingleton<CreditApplicationGenerator>();
builder.Services.AddScoped<CreditApplicationService>();

builder.Services.AddCors(options =>
{
options.AddDefaultPolicy(policy =>
{
if (builder.Environment.IsDevelopment())
{
policy.AllowAnyOrigin()
.AllowAnyMethod()
.AllowAnyHeader();
}
else
{
policy.WithOrigins("https://your-production-frontend.example")
.WithMethods("GET")
.WithHeaders("Content-Type", "Authorization");
}
});
});

var app = builder.Build();

app.UseCors();
app.UseSerilogRequestLogging();

app.MapDefaultEndpoints();

// API endpoint для получения кредитной заявки
app.MapGet("/credit-application", async (
int id,
CreditApplicationService service,
ILogger<Program> logger,
CancellationToken cancellationToken) =>
{
logger.LogInformation("Received request for credit application with ID: {Id}", id);

if (id <= 0)
{
logger.LogWarning("Received invalid ID: {Id}", id);
return Results.BadRequest(new { error = "ID must be a positive number" });
}

try
{
var application = await service.GetByIdAsync(id, cancellationToken);
return Results.Ok(application);
}
catch (Exception ex)
{
logger.LogError(ex, "Error while getting credit application {Id}", id);
return Results.Problem("An error occurred while processing the request");
}
})
.WithName("GetCreditApplication");

app.Run();
23 changes: 23 additions & 0 deletions CreditApplication.Generator/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
"applicationUrl": "http://localhost:5171",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": false,
"applicationUrl": "https://localhost:7171;http://localhost:5171",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
Loading