2019-04-25 16:12:29 +00:00
|
|
|
from Houdini.Data import db, BaseCrumbsCollection
|
|
|
|
from Houdini.Data.Penguin import PenguinPostcard
|
2019-03-18 15:56:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Postcard(db.Model):
|
|
|
|
__tablename__ = 'postcard'
|
|
|
|
|
|
|
|
ID = db.Column(db.Integer, primary_key=True)
|
|
|
|
Name = db.Column(db.String(50), nullable=False)
|
|
|
|
Cost = db.Column(db.Integer, nullable=False, server_default=db.text("10"))
|
|
|
|
Enabled = db.Column(db.Boolean, nullable=False, server_default=db.text("false"))
|
|
|
|
|
|
|
|
|
2019-04-25 16:12:29 +00:00
|
|
|
class PostcardCrumbsCollection(BaseCrumbsCollection):
|
|
|
|
|
|
|
|
def __init__(self, inventory_id=None):
|
|
|
|
super().__init__(model=Postcard, key='ID', inventory_model=PenguinPostcard,
|
|
|
|
inventory_id=inventory_id)
|