feat: initialize aivideo project

This commit is contained in:
2026-04-17 18:33:05 +08:00
commit 14b18d67fe
162 changed files with 26251 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
from sqlalchemy import select
from sqlalchemy.orm import Session
from app.models.entities import User
class UsersRepository:
def __init__(self, db: Session) -> None:
self.db = db
def get_by_id(self, user_id: int) -> User | None:
return self.db.scalar(select(User).where(User.id == user_id))
def get_by_username(self, username: str) -> User | None:
return self.db.scalar(select(User).where(User.username == username))