#!/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) if __name__ == "__main__": db.bind(provider="sqlite", filename="../../clean/31-2/data.sqlite3") db.generate_mapping(create_tables=True)