roles.py 257 B

12345678910
  1. import time
  2. from typing import List
  3. from app import models, schemas
  4. from sqlalchemy.orm import Session
  5. def get_role_info(db: Session, id: int):
  6. role: models.Roles = db.query(models.Roles)\
  7. .filter(models.Roles.id == id).first()
  8. return role