From 9cb2a86aaa13036ae0cb1a78d6cbe4d7fab479e9 Mon Sep 17 00:00:00 2001 From: "gorbenko.pavel" Date: Wed, 22 Jul 2026 16:06:56 +0500 Subject: [PATCH] use snakecase naming convention --- backend/Directory.Packages.props | 13 +++++++------ .../InfrastructureServiceCollectionExtensions.cs | 3 ++- .../Persistence/ApprovalRouteDbContext.cs | 3 --- .../Tnsu.ApprovalRoute.Infrastructure.csproj | 6 +++++- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/backend/Directory.Packages.props b/backend/Directory.Packages.props index 6dc7798..8efa8f5 100644 --- a/backend/Directory.Packages.props +++ b/backend/Directory.Packages.props @@ -3,12 +3,13 @@ true + - - - - - - + + + + + + \ No newline at end of file diff --git a/backend/src/Tnsu.ApprovalRoute.Infrastructure/InfrastructureServiceCollectionExtensions.cs b/backend/src/Tnsu.ApprovalRoute.Infrastructure/InfrastructureServiceCollectionExtensions.cs index 7a70fcf..a006dd4 100644 --- a/backend/src/Tnsu.ApprovalRoute.Infrastructure/InfrastructureServiceCollectionExtensions.cs +++ b/backend/src/Tnsu.ApprovalRoute.Infrastructure/InfrastructureServiceCollectionExtensions.cs @@ -12,7 +12,8 @@ public static class InfrastructureServiceCollectionExtensions this IServiceCollection services, IConfiguration configuration) { services.AddDbContext(opt => - opt.UseNpgsql(configuration.GetConnectionString("Postgres"))); + opt.UseNpgsql(configuration.GetConnectionString("Postgres")) + .UseSnakeCaseNamingConvention()); services.AddAsyncInitializer(); return services; diff --git a/backend/src/Tnsu.ApprovalRoute.Infrastructure/Persistence/ApprovalRouteDbContext.cs b/backend/src/Tnsu.ApprovalRoute.Infrastructure/Persistence/ApprovalRouteDbContext.cs index c845852..1dba8f5 100644 --- a/backend/src/Tnsu.ApprovalRoute.Infrastructure/Persistence/ApprovalRouteDbContext.cs +++ b/backend/src/Tnsu.ApprovalRoute.Infrastructure/Persistence/ApprovalRouteDbContext.cs @@ -13,7 +13,6 @@ public class ApprovalRouteDbContext(DbContextOptions opt { modelBuilder.Entity(e => { - e.ToTable("request_types"); e.HasKey(x => x.Id); e.Property(x => x.Name).HasMaxLength(256).IsRequired(); e.Property(x => x.PageUrl).HasMaxLength(512).IsRequired(); @@ -21,7 +20,6 @@ public class ApprovalRouteDbContext(DbContextOptions opt modelBuilder.Entity(e => { - e.ToTable("routes"); e.HasKey(x => x.Id); e.Property(x => x.RouteType).HasConversion().HasMaxLength(32).IsRequired(); e.HasOne(x => x.RequestType).WithMany(x => x.Routes).HasForeignKey(x => x.RequestTypeId); @@ -29,7 +27,6 @@ public class ApprovalRouteDbContext(DbContextOptions opt modelBuilder.Entity(e => { - e.ToTable("route_steps"); e.HasKey(x => x.Id); e.Property(x => x.Position).HasMaxLength(128).IsRequired(); e.Property(x => x.Status).HasConversion().HasMaxLength(32).IsRequired(); diff --git a/backend/src/Tnsu.ApprovalRoute.Infrastructure/Tnsu.ApprovalRoute.Infrastructure.csproj b/backend/src/Tnsu.ApprovalRoute.Infrastructure/Tnsu.ApprovalRoute.Infrastructure.csproj index ef0f30b..7e08a20 100644 --- a/backend/src/Tnsu.ApprovalRoute.Infrastructure/Tnsu.ApprovalRoute.Infrastructure.csproj +++ b/backend/src/Tnsu.ApprovalRoute.Infrastructure/Tnsu.ApprovalRoute.Infrastructure.csproj @@ -4,9 +4,13 @@ + - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive +