init
This commit is contained in:
15
app/crud/result_crud.py
Normal file
15
app/crud/result_crud.py
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding:utf-8 -*-
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from app.models.result import Result
|
||||
from app.schemas import ResultCreate, ResultUpdate
|
||||
from app.crud.base import CRUDBase
|
||||
|
||||
|
||||
class CRUDResult(CRUDBase[Result, ResultUpdate, ResultCreate]):
|
||||
def get_by_uuid(self, db: Session, uuid: str) -> Result:
|
||||
return db.query(self.model).filter(self.model.uuid == uuid).all()
|
||||
|
||||
|
||||
result = CRUDResult(Result)
|
||||
Reference in New Issue
Block a user