recopytex/backend/adapters/orm.py

18 lines
367 B
Python
Raw Normal View History

2022-12-20 09:25:12 +00:00
from sqlalchemy import Column, MetaData, String, Table
from sqlalchemy.orm import mapper
from backend.model.tribe import Tribe as TribeModel
metadata = MetaData()
tribes = Table(
"tribes",
metadata,
Column("name", String(255), primary_key=True),
Column("level", String(255)),
)
def start_mappers():
tribes_mapper = mapper(TribeModel, tribes)