added data presets

This commit is contained in:
Djalim Simaila 2023-01-03 13:41:05 +01:00
parent 8d9886fc8d
commit 38c3ed3f64
8 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,5 @@
from tables import Answer
ANSWER = [
]

25
data_persistance/data.py Normal file
View File

@ -0,0 +1,25 @@
from sqlalchemy import create_engine
from sqlalchemy.orm import Session
from tables import *
from answer import ANSWER
from locales import LOCALES
from npc import NPCS
from places import PLACES
from questions import QUESTIONS
from reactions import REACTIONS
from traits import TRAITS
# Create Engine and tables
engine = create_engine("sqlite://", echo=True, future=True)
Base.metadata.create_all(engine)
with Session(engine) as session:
session.add_all(ANSWER)
session.add_all(LOCALES)
session.add_all(NPCS)
session.add_all(PLACES)
session.add_all(QUESTIONS)
session.add_all(REACTIONS)
session.add_all(TRAITS)

View File

@ -0,0 +1,5 @@
from tables import Locale
LOCALES = [
Locale(0,"EN", "Hello World"),
]

5
data_persistance/npc.py Normal file
View File

@ -0,0 +1,5 @@
from tables import Npc
NPCS = [
]

View File

@ -0,0 +1,5 @@
from tables import Place
PLACES = [
]

View File

@ -0,0 +1,5 @@
from tables import Question
QUESTIONS = [
]

View File

@ -0,0 +1,5 @@
from tables import Reaction
REACTIONS = [
]

View File

@ -0,0 +1,5 @@
from tables import Trait
TRAITS = [
]