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-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)
|