from fastapi import APIRouter, Depends
from ..utils import engine, get_session
from sqlmodel import Session, select, or_
from ..models.team import Team
from ..models.user import User
from sqlalchemy.exc import NoResultFound
from datetime import datetime

router = APIRouter(prefix="/api/teams", tags=["team"])
session = Session(engine)


@router.post("/")
async def post_team(
    *,
    team: Team,
    session: Session = Depends(get_session),
):
    """Post new team"""
    statement = 