feat: add Eventify ID (EVT-XXXXXXXX) to User model and all APIs

- Add eventify_id CharField (unique, indexed, editable=False) to User
- Auto-generate on save() with charset excluding I/O/0/1 for clarity
- Migration 0012: add field nullable, backfill all existing users, make non-null
- Sync migration 0011 (allowed_modules) pulled from server
- Expose eventify_id in accounts/api.py, partner/api.py serializers
- Expose eventify_id in mobile_api login response (populates localStorage)
This commit is contained in:
2026-04-02 10:25:25 +05:30
parent 255519473b
commit 384797551f
5 changed files with 88 additions and 2 deletions

View File

@@ -82,8 +82,9 @@ class LoginView(View):
print('3')
log("info", "API login", request=request, user=user)
response = {
'message': 'Login successful',
'message': 'Login successful',
'token': token.key,
'eventify_id': user.eventify_id,
'username': user.username,
'email': user.email,
'phone_number': user.phone_number,