Add precommit and basic sqlalchemy setup

This commit is contained in:
Joey Yakimowich-Payne 2023-08-09 11:00:55 -06:00
commit 1bbaef1c60
No known key found for this signature in database
GPG key ID: 6BFE655FA5ABD1E1
7 changed files with 285 additions and 2 deletions

19
api/db/models.py Normal file
View file

@ -0,0 +1,19 @@
from typing import List
from typing import Optional
from sqlalchemy import ForeignKey
from sqlalchemy import String
from sqlalchemy.orm import DeclarativeBase
from sqlalchemy.orm import Mapped
from sqlalchemy.orm import mapped_column
from sqlalchemy.orm import relationship
from .engine import engine
class Base(DeclarativeBase):
pass
def create_tables():
Base.metadata.create_all(engine)