2022-09-30 21:25:52 +08:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# # -*- coding: utf-8 -*-
|
|
|
|
|
2022-09-30 20:53:40 +08:00
|
|
|
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)
|
2022-09-30 21:25:52 +08:00
|
|
|
|
|
|
|
|
|
|
|
class Shield(db.Entity):
|
|
|
|
name = Required(str)
|
|
|
|
description = Optional(str)
|
|
|
|
mechanism = Optional(str)
|
|
|
|
icon = Required(bytes)
|
|
|
|
stats = Required(int)
|
|
|
|
|
|
|
|
|
2022-10-03 11:17:04 +08:00
|
|
|
class Ranged(db.Entity):
|
|
|
|
name = Required(str)
|
|
|
|
description = Optional(str)
|
|
|
|
mechanism = Optional(str)
|
|
|
|
icon = Required(bytes)
|
|
|
|
stats = Required(int)
|
|
|
|
|
|
|
|
|
2022-10-07 11:37:25 +08:00
|
|
|
class Outfit(db.Entity):
|
|
|
|
name = Required(str)
|
|
|
|
name_en = Required(str)
|
|
|
|
description = Optional(str)
|
|
|
|
icon = Required(bytes)
|
|
|
|
preview = Optional(bytes)
|
|
|
|
cell_cost = Required(int)
|
|
|
|
|
|
|
|
|
2022-09-30 21:25:52 +08:00
|
|
|
if __name__ == "__main__":
|
|
|
|
db.bind(provider="sqlite", filename="../../clean/31-2/data.sqlite3")
|
|
|
|
db.generate_mapping(create_tables=True)
|