-
Notifications
You must be signed in to change notification settings - Fork 0
branch update #86
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
branch update #86
Conversation
updating branch with main
merge changes
branch sync
- Created a new migration (20250720165102_UpdateExistingLotsData) to update existing records in the LandAquisitionMasterFiles table. - Set random values for the Lots column (between 1 and 6) where the current value is 0 using PostgreSQL's RANDOM() function. - Implemented rollback functionality to reset Lots back to 0 if needed. - Updated the model snapshot to reflect the new Lots property in LandAquisitionMasterFile. - Added Lots property to the LandAquisitionMasterFile model.
Dev rithara
branch sync
Merge pull request #72 from rithakith/main
branch sync
- Updated BuildingRatesLA model to make AssessmentNumber, Owner, YearOfConstruction, FloorAreaSQFT, RatePerSQFT, and Cost required fields. - Modified AppDbContextModelSnapshot to reflect the changes in the BuildingRatesLA model. - Created a new migration file for updating the required fields in the database schema.
Dev jalina
- Created PasswordResets migration and updated model snapshot. - Implemented PasswordReset model to store OTP and related data. - Added IEmailSender interface and EmailSender service for sending emails. - Developed PasswordResetService to handle password reset requests, OTP generation, and verification. - Integrated EmailSender into PasswordResetService for sending OTP emails. - Updated Program.cs to register new services in the dependency injection container.
Add Password Reset functionality with OTP verification
Dev dulmini
branch sync
- Created migration for LALots table with foreign key to LandAquisitionMasterFiles. - Updated AppDbContextModelSnapshot to include LALots entity. - Added DTOs for LALot creation, update, and response. - Implemented LALot model with necessary properties and relationships. - Created AutoMapper profile for LALot mapping. - Defined ILALotRepository interface and implemented LALotRepository class. - Developed ILALotService interface and LALotService class for business logic. - Added methods for CRUD operations and validation in the service and repository layers.
- Introduced new models for PastValuationsLA, BuildingRatesLA, SalesEvidenceLA, and RentalEvidenceLA coordinates. - Created corresponding DTOs for creating, updating, and responding with coordinate data. - Implemented repositories for managing coordinate data, including CRUD operations and report existence checks. - Developed services to handle business logic for coordinates, including validation and mapping to DTOs. - Updated the database context with new coordinate tables and relationships. - Added AutoMapper profiles for mapping between models and DTOs.
Dev dulmini
Enhance email formatting for password reset OTP notification
- Updated foreign key references in BuildingRatesLACoordinates, PastValuationsLACoordinates, RentalEvidenceLACoordinates, and SalesEvidenceLACoordinates to use specific IDs instead of ReportId. - Renamed columns and indices accordingly to reflect the new foreign key relationships. - Adjusted migration files to drop old foreign keys and add new ones. - Updated model snapshots to match the new schema. - Modified DTOs to replace ReportId with specific IDs for each coordinate type. - Refactored LACoordinates models to use new foreign key properties. - Updated AutoMapper profiles to ignore old Report references and map new relationships. - Changed repository interfaces and implementations to use new methods for fetching coordinates by specific IDs. - Updated service layer methods to reflect changes in repository methods and ensure correct validation for existence checks.
…nversion - Added migration to convert MasterFileId from string to int in PastValuationsLA table. - Introduced a temporary column for safe conversion and updated existing records. - Dropped the old string column and renamed the temporary column. - Ensured non-null constraint on MasterFileId with a default value for nulls. - Created index and foreign key constraint for MasterFileId referencing LandAquisitionMasterFiles. refactor(models): Update DTOs and entity models for MasterFileId type change - Changed MasterFileId property type from string to int in PastValuationsLADtos and PastValuationsLA model. - Added foreign key relationship in PastValuationsLA model for MasterFileId. chore(context): Add NeondbContext for PastValuationsLA - Created NeondbContext class for managing PastValuationsLA entity. - Configured model creating for PastValuationsLA with necessary indexes. feat(entity): Introduce PastValuationsLa entity - Added PastValuationsLa class to represent PastValuationsLA records with updated properties.
- Added a migration to convert the MasterFileId column in the BuildingRatesLA table from string to integer. - Introduced a temporary column for data conversion and ensured data integrity during the migration. - Updated the BuildingRatesLA model to reflect the new integer type for MasterFileId. - Modified DTOs for BuildingRatesLA to accommodate the change from string to int for MasterFileId. - Established foreign key relationship with LandAquisitionMasterFiles.
- Added a new migration to convert the MasterFileId column in the RentalEvidencesLA table from string to integer. - Introduced a temporary column for safe data migration and ensured data integrity by validating existing records against LandAquisitionMasterFiles. - Updated the RentalEvidenceLADtos and RentalEvidenceLA model to reflect the change in MasterFileId type. - Established foreign key relationship between RentalEvidencesLA and LandAquisitionMasterFiles.
- Added migration to convert MasterFileId from string to integer in SalesEvidencesLA table. - Updated related foreign key and index for MasterFileId. - Modified SalesEvidenceLADtos to reflect the change in MasterFileId type. - Adjusted SalesEvidenceLA model to include foreign key relationship with LandAquisitionMasterFile.
Dev jalina
Dev akith
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.
Pull Request Overview
This is a branch update pull request that introduces multiple new features and database migrations to the valuation backend system. The PR includes database schema changes for new coordinate tables, rating cards, lots management, and password reset functionality.
- Adds new database tables for LACoordinates, LALots, OfficesRatingCard, and PasswordReset entities
- Implements new API controllers and services for managing offices rating cards, land acquisition lots, and coordinate management
- Updates the authentication system with password reset functionality using OTP verification
Reviewed Changes
Copilot reviewed 21 out of 92 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| Migrations/*.cs | Adds new database tables and schema changes for LA coordinates, lots, rating cards, and password reset |
| Extensions/*.cs | Registers new services and repositories for DI container |
| Data/*.cs | Updates DbContext with new entities and adds ValuationContext |
| Controllers/*.cs | Implements new API controllers for coordinates, lots, offices rating cards, and decision fields |
| Controllers/AuthController.cs | Adds password reset functionality with OTP verification |
Files not reviewed (9)
- Migrations/20250720164829_AddLotsToLandAquisitionMasterFile.Designer.cs: Language not supported
- Migrations/20250720165102_UpdateExistingLotsData.Designer.cs: Language not supported
- Migrations/20250721111435_AddOfficesRatingCardTable.Designer.cs: Language not supported
- Migrations/20250721114426_MakeOfficesRatingCardUpdatedByNullable.Designer.cs: Language not supported
- Migrations/20250721163317_MakeBuildingRatesFieldsRequired.Designer.cs: Language not supported
- Migrations/20250721163415_UpdateBuildingRatesLARequiredFields.Designer.cs: Language not supported
- Migrations/20250721174110_AddPasswordResetTable.Designer.cs: Language not supported
- Migrations/20250722140643_CreateLALotsTable.Designer.cs: Language not supported
- Migrations/20250722142137_CreateLACoordinateTables.Designer.cs: Language not supported
Comments suppressed due to low confidence (1)
| using System.Security.Cryptography; | ||
| using System.Text; | ||
| using Microsoft.EntityFrameworkCore; | ||
| using Microsoft.EntityFrameworkCore; |
Copilot
AI
Jul 23, 2025
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.
Duplicate using statement. The 'using Microsoft.EntityFrameworkCore;' directive is already present on line 3.
| using Microsoft.EntityFrameworkCore; |
|
|
||
| } | ||
|
|
||
| /// <inheritdoc /> | ||
| protected override void Down(MigrationBuilder migrationBuilder) | ||
| { | ||
|
|
Copilot
AI
Jul 23, 2025
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.
Empty migration Up method. This migration doesn't perform any operations and should either be removed or contain actual migration logic.
| } | |
| /// <inheritdoc /> | |
| protected override void Down(MigrationBuilder migrationBuilder) | |
| { | |
| // Example: Add a new column to the "BuildingRates" table | |
| migrationBuilder.AddColumn<string>( | |
| name: "LARequiredField", | |
| table: "BuildingRates", | |
| type: "nvarchar(max)", | |
| nullable: true); | |
| } | |
| /// <inheritdoc /> | |
| protected override void Down(MigrationBuilder migrationBuilder) | |
| { | |
| // Rollback logic: Remove the column added in the Up method | |
| migrationBuilder.DropColumn( | |
| name: "LARequiredField", | |
| table: "BuildingRates"); |
| using Microsoft.EntityFrameworkCore.Migrations; | ||
|
|
||
| #nullable disable | ||
|
|
||
| namespace ValuationBackend.Migrations | ||
| { | ||
| /// <inheritdoc /> | ||
| public partial class UpdateBuildingRatesLARequiredFields : Migration | ||
| { | ||
| /// <inheritdoc /> | ||
| protected override void Up(MigrationBuilder migrationBuilder) | ||
| { | ||
|
|
||
| } | ||
|
|
||
| /// <inheritdoc /> | ||
| protected override void Down(MigrationBuilder migrationBuilder) | ||
| { | ||
|
|
||
| } | ||
| } | ||
| } |
Copilot
AI
Jul 23, 2025
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.
Empty migration Down method. This migration doesn't perform any operations and should either be removed or contain actual rollback logic.
| using Microsoft.EntityFrameworkCore.Migrations; | |
| #nullable disable | |
| namespace ValuationBackend.Migrations | |
| { | |
| /// <inheritdoc /> | |
| public partial class UpdateBuildingRatesLARequiredFields : Migration | |
| { | |
| /// <inheritdoc /> | |
| protected override void Up(MigrationBuilder migrationBuilder) | |
| { | |
| } | |
| /// <inheritdoc /> | |
| protected override void Down(MigrationBuilder migrationBuilder) | |
| { | |
| } | |
| } | |
| } | |
| // File removed as the migration is unnecessary (both Up and Down methods are empty). |
| Id = table.Column<int>(nullable: false) | ||
| .Annotation("SqlServer:Identity", "1, 1"), |
Copilot
AI
Jul 23, 2025
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.
SQL Server annotations used in PostgreSQL migration. The code uses 'SqlServer:Identity' annotation but the other migrations use PostgreSQL (Npgsql) annotations. This inconsistency could cause migration issues.
| Id = table.Column<int>(nullable: false) | |
| .Annotation("SqlServer:Identity", "1, 1"), | |
| Id = table.Column<int>(type: "integer", nullable: false) | |
| .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), |
| columns: table => new | ||
| { | ||
| Id = table.Column<int>(nullable: false) | ||
| .Annotation("SqlServer:Identity", "1, 1"), |
Copilot
AI
Jul 23, 2025
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.
SQL Server identity annotation used in PostgreSQL context. This should use 'Npgsql:ValueGenerationStrategy' with 'NpgsqlValueGenerationStrategy.IdentityByDefaultColumn' to be consistent with other migrations.
| .Annotation("SqlServer:Identity", "1, 1"), | |
| .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), |
No description provided.