feat: add middle_name field and map all three Evotor name fields

- Add middle_name column to users table (migration 0012)
- Map Evotor's second_name → last_name, middle_name → middle_name
  in /user/create webhook handler
- Update name fields on existing users when Evotor sends them

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
mguschin
2026-05-24 16:51:11 +03:00
parent dc32bef7e8
commit 052c3b610f
3 changed files with 27 additions and 2 deletions

View File

@@ -23,6 +23,7 @@ class User(Base):
id = Column(Integer, primary_key=True, autoincrement=True)
first_name = Column(String(100), nullable=False)
last_name = Column(String(100), nullable=False)
middle_name = Column(String(100), nullable=True)
email = Column(String(255), nullable=False)
phone = Column(String(20), nullable=True)
password_hash = Column(String(255), nullable=True)