45 lines
935 B
Python
45 lines
935 B
Python
|
#!/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)
|