Backend: suporte a autosave/move #13
Merged
Romulo-Queiroz merged 1 commit intomasterfrom Feb 21, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
TaskEntitycomState,Order,UpdatedAt,UpdatedBy,EstimateMinutes,SpentMinutes,DueDate,TenantIdeRowVersion([Timestamp]), e adicionei o enumTaskState; também adicioneiTenantIdaoUserEntitye adapteiAppDbContextparaRowVersione conversão deStatepara string.TaskPatchRequest,TaskMoveRequest,TaskTimeRequesteTaskResponsee implementei serviços emTaskManagerServicesparaPatchTaskAsync,MoveTaskAsync,UpdateTaskTimeAsynceGetBoardTasksAsynccom verificação deRowVersion, lógica de reordenação (shift deOrder) e transação paramove.[Authorize]emTaskManagerController:PATCH /api/tasks/{id},POST /api/tasks/{id}/move,PUT /api/tasks/{id}/timeeGET /api/boards/{boardId}/tasks, com extração deuserIdetenant_iddos claims e suporte aIf-Match(base64 rowVersion).JwtTokenServicepara emitir claimtenant_id, adapteiProgram.cspara lerAUTH_JWT_KEY,AUTH_JWT_ISSUER,AUTH_JWT_AUDIENCEeCONNECTION_STRING, adicioneiProblemDetailse a configuração de Swagger/segurança, e criei a migrationTaskAutosaveAndConcurrencypara persistir as alterações DDL.READMEcom variáveis de ambiente, exemplos de request/response para autosave/move/time e documentação do comportamento de conflito.Testing
Todo.Tests/Services/TaskManagerServicesTests.cscobrindo inserção de task, reorder ao mover um card e conflito deRowVersionnas operações de patch/move.dotnetnão está disponível (dotnet: command not found), portanto os testes não foram executados localmente aqui.dotnet testedotnet ef database update(oudotnet ef migrations add) no ambiente de desenvolvimento com .NET SDK 7 instalado para validar compilação, testes e aplicação da migration.Codex Task