Start models
This commit is contained in:
parent
230e336b2b
commit
b459dbc9b7
2 changed files with 30 additions and 0 deletions
|
@ -4,6 +4,7 @@ from glob import glob
|
||||||
from os import path, walk
|
from os import path, walk
|
||||||
from tatsu import parse as tatsu_parse
|
from tatsu import parse as tatsu_parse
|
||||||
import itertools
|
import itertools
|
||||||
|
from .models import Location
|
||||||
|
|
||||||
|
|
||||||
# TODO Use proper way to get resources, see https://stackoverflow.com/a/10935674
|
# TODO Use proper way to get resources, see https://stackoverflow.com/a/10935674
|
||||||
|
|
29
app/hlds/models.py
Normal file
29
app/hlds/models.py
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
from typing import List
|
||||||
|
|
||||||
|
|
||||||
|
class Option:
|
||||||
|
def __init__(self, id_, name, description):
|
||||||
|
self.id = id_
|
||||||
|
self.name = name
|
||||||
|
self.description = description
|
||||||
|
|
||||||
|
|
||||||
|
class Choice:
|
||||||
|
def __init__(self, id_, name, description, options):
|
||||||
|
self.id = id_
|
||||||
|
self.name = name
|
||||||
|
self.description = description
|
||||||
|
|
||||||
|
self.options: List[Option] = options
|
||||||
|
|
||||||
|
|
||||||
|
class Location:
|
||||||
|
def __init__(self, id_, name, properties, choices, bases):
|
||||||
|
self.id = id_
|
||||||
|
self.name = name
|
||||||
|
self.properties = properties
|
||||||
|
|
||||||
|
self.choices: List[Choice] = choices
|
||||||
|
self.bases = bases
|
Loading…
Reference in a new issue