This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fastapi import APIRouter | |
from fastapi.responses import JSONResponse | |
from sqlmodel import select | |
from src.config.database import get_session | |
from src.models.manutencao_model import Manutencao | |
manutencao_router = APIRouter(prefix="/manutencoes") | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fastapi import APIRouter | |
from src.models.provas_model import Provas | |
from src.config.database import get_session | |
provas_router = APIRouter(prefix="/provas") | |
@provas_router.post("") | |
def cria_prova(prova: Provas): | |
with get_session() as session: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import List | |
from sqlmodel import Field, Relationship, SQLModel | |
class Provas(SQLModel, table=True): | |
id: int = Field(default=None, primary_key=True) | |
descricao: str | |
data_prova: str | |
q1: str |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from contextlib import contextmanager | |
from sqlmodel import Session, SQLModel, create_engine | |
PG_USERNAME = "root" | |
PG_PASSWORD = "postgres" | |
PG_HOST = "localhost" | |
PG_PORT = 54322 | |
PG_DATABASE = "race_db" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// "workbench.colorTheme": "Monokai Dark Soda", | |
"workbench.startupEditor": "none", | |
"workbench.editor.enablePreview": false, | |
"workbench.editor.labelFormat": "short", | |
"workbench.editor.revealIfOpen": true, | |
"telemetry.telemetryLevel": "off", | |
"security.workspace.trust.enabled": false, | |
"editor.hover.above": false, | |
"editor.guides.bracketPairs": true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Section "ServerFlags" | |
Option "DontZap" "on" | |
EndSection | |
Section "InputClass" | |
Identifier "Keyboard Defaults" | |
MatchIsKeyboard "yes" | |
Option "XkbOptions" "terminate:ctrl_alt_bksp" | |
EndSection |