- Add main application files (main.py, models.py, schemas.py, etc.) - Add routers for all features (waiting, attendance, members, etc.) - Add HTML templates for admin and user interfaces - Add migration scripts and utility files - Add Docker configuration - Add documentation files - Add .gitignore to exclude database and cache files 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
18 lines
596 B
Python
18 lines
596 B
Python
from database import SessionLocal
|
|
from models import User, Store
|
|
|
|
db = SessionLocal()
|
|
user = db.query(User).filter(User.username == "cellstar01").first()
|
|
if user:
|
|
print(f"User found: {user.username}, Role: {user.role}, Store ID: {user.store_id}")
|
|
if user.store_id:
|
|
store = db.query(Store).filter(Store.id == user.store_id).first()
|
|
if store:
|
|
print(f"Store found: {store.name}, Code: {store.code}")
|
|
else:
|
|
print("Store not found for this user.")
|
|
else:
|
|
print("User has no store_id.")
|
|
else:
|
|
print("User 'cellstar01' not found.")
|