dead-cells-wiki/data/convert/31-4/db.py

45 lines
935 B
Python
Raw Permalink Normal View History

2022-10-15 21:52:02 -05:00
#!/usr/bin/env python3
# # -*- coding: utf-8 -*-
from pony.orm import *
db = Database()
class Melee(db.Entity):
name = Required(str)
description = Optional(str)
mechanism = Optional(str)
icon = Required(bytes)
stats = Required(int)
class Shield(db.Entity):
name = Required(str)
description = Optional(str)
mechanism = Optional(str)
icon = Required(bytes)
stats = Required(int)
class Ranged(db.Entity):
name = Required(str)
description = Optional(str)
mechanism = Optional(str)
icon = Required(bytes)
stats = Required(int)
class Outfit(db.Entity):
name = Required(str)
name_en = Required(str)
description = Optional(str)
icon = Required(bytes)
preview = Optional(bytes)
cell_cost = Required(int)
if __name__ == "__main__":
db.bind(provider="sqlite", filename="../../clean/31-4/data.sqlite3")
db.generate_mapping(create_tables=True)