Files
AI-Website/backend/app/show_admin.py
2026-01-09 09:48:57 +08:00

14 lines
472 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 文件已删除admin 查询脚本不再需要。
db = database.SessionLocal()
admin = db.query(models.User).filter(models.User.username == "admin").first()
if admin:
print("id:", admin.id)
print("username:", admin.username)
print("is_admin:", admin.is_admin)
print("is_active:", admin.is_active)
print("balance:", admin.balance)
print("hashed_password:", admin.hashed_password)
else:
print("admin 用户不存在")
db.close()