refactor(models): agregar campos de perfil al modelo User#5
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the backend User ORM model to support upcoming user profile personalization by adding explicit first_name and last_name identity fields and improving debug readability via a custom __repr__.
Changes:
- Add
first_nameandlast_namecolumns toUseras non-nullString(50)fields. - Add a
User.__repr__that formats instances as<User {first_name} {last_name} ({email})>.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
refactor/user-profile-fields
Descripción
Se amplía la entidad
Userincorporando los camposfirst_nameylast_name(String de 50 caracteres, estrictamente no nulos). Esta reestructuración es preventiva para soportar la futura interfaz del panel de configuración y la personalización en el envío de correos.Detalles de la modificación:
emailypassword_hashpara mantener la cohesión visual de los datos de identidad frente a los datos de acceso.__repr__para que devuelva el formato<User {first_name} {last_name} ({email})>, facilitando la trazabilidad y el debugging interactivo.CheckConstraintde roles) permanecen intactas.alembic), esta modificación se asimila directamente en el esquema primario sin generar conflictos de esquema.Tipo de cambio
Cómo probar
git checkout develop && git pull origin developcd backendflask --app run shell