class Puffle(db.Model): __tablename__ = 'puffle' id = db.Column(db.Integer, primary_key=True) parent_id = db.Column(db.ForeignKey('puffle.id', ondelete='CASCADE', onupdate='CASCADE'), nullable=False) name = db.Column(db.String(50), nullable=False, server_default=db.text("''::character varying")) member = db.Column(db.Boolean, nullable=False, server_default=db.text("false")) favourite_food = db.Column(db.ForeignKey('puffle_item.id', ondelete='CASCADE', onupdate='CASCADE'), nullable=False) runaway_postcard = db.Column( db.ForeignKey('postcard.id', ondelete='CASCADE', onupdate='CASCADE')) max_food = db.Column(db.SmallInteger, nullable=False, server_default=db.text("100")) max_rest = db.Column(db.SmallInteger, nullable=False, server_default=db.text("100")) max_clean = db.Column(db.SmallInteger, nullable=False, server_default=db.text("100"))
class PenguinPostcard(db.Model): __tablename__ = 'penguin_postcard' id = db.Column(db.Integer, primary_key=True, server_default=db.text( "nextval('\"penguin_postcard_id_seq\"'::regclass)")) penguin_id = db.Column(db.ForeignKey('penguin.id', ondelete='CASCADE', onupdate='CASCADE'), nullable=False, index=True) sender_id = db.Column(db.ForeignKey('penguin.id', ondelete='CASCADE', onupdate='CASCADE'), index=True) postcard_id = db.Column(db.ForeignKey('postcard.id', ondelete='CASCADE', onupdate='CASCADE'), nullable=False) send_date = db.Column(db.DateTime, nullable=False, server_default=db.text("now()")) details = db.Column(db.String(255), nullable=False, server_default=db.text("''::character varying")) has_read = db.Column(db.Boolean, nullable=False, server_default=db.text("false"))
class CharacterBuddy(db.Model): __tablename__ = 'character_buddy' penguin_id = db.Column(db.ForeignKey('penguin.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False) character_id = db.Column(db.ForeignKey('character.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False) best_buddy = db.Column(db.Boolean, nullable=False, server_default=db.text("false"))
class PenguinIglooRoom(db.Model): __tablename__ = 'penguin_igloo_room' id = db.Column(db.Integer, primary_key=True, server_default=db.text( "nextval('\"penguin_igloo_room_id_seq\"'::regclass)")) penguin_id = db.Column(db.ForeignKey('penguin.id', ondelete='CASCADE', onupdate='CASCADE'), nullable=False) type = db.Column(db.ForeignKey('igloo.id', ondelete='CASCADE', onupdate='CASCADE'), nullable=False) flooring = db.Column(db.ForeignKey('flooring.id', ondelete='CASCADE', onupdate='CASCADE'), nullable=False) music = db.Column(db.SmallInteger, nullable=False, server_default=db.text("0")) location = db.Column(db.ForeignKey('location.id', ondelete='CASCADE', onupdate='CASCADE'), nullable=False) locked = db.Column(db.Boolean, nullable=False, server_default=db.text("false"))
class Character(db.Model): __tablename__ = 'character' id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(30), nullable=False) gift_id = db.Column(db.ForeignKey('item.id', ondelete='CASCADE', onupdate='CASCADE')) stamp_id = db.Column(db.ForeignKey('stamp.id', ondelete='CASCADE', onupdate='CASCADE'))
class PenguinRedemptionBook(db.Model): __tablename__ = 'penguin_redemption_book' penguin_id = db.Column(db.ForeignKey('penguin.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False) book_id = db.Column(db.ForeignKey('redemption_book.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False, index=True)
class Report(db.Model): __tablename__ = 'report' id = db.Column( db.Integer, primary_key=True, server_default=db.text("nextval('\"report_ID_seq\"'::regclass)")) penguin_id = db.Column(db.ForeignKey('penguin.id', ondelete='CASCADE', onupdate='CASCADE'), nullable=False) reporter_id = db.Column(db.ForeignKey('penguin.id', ondelete='CASCADE', onupdate='CASCADE'), nullable=False) report_type = db.Column(db.SmallInteger, nullable=False, server_default=db.text("0")) date = db.Column(db.DateTime, nullable=False, server_default=db.text("now()")) server_id = db.Column(db.Integer, nullable=False) room_id = db.Column(db.ForeignKey('room.id', ondelete='CASCADE', onupdate='CASCADE'), nullable=False)
class IglooFurniture(db.Model): __tablename__ = 'igloo_furniture' igloo_id = db.Column(db.ForeignKey('penguin_igloo_room.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False, index=True) furniture_id = db.Column(db.ForeignKey('furniture.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False) x = db.Column(db.SmallInteger, primary_key=True, nullable=False, server_default=db.text("0")) y = db.Column(db.SmallInteger, primary_key=True, nullable=False, server_default=db.text("0")) frame = db.Column(db.SmallInteger, primary_key=True, nullable=False, server_default=db.text("0")) rotation = db.Column(db.SmallInteger, primary_key=True, nullable=False, server_default=db.text("0"))
class BuddyList(db.Model): __tablename__ = 'buddy_list' penguin_id = db.Column(db.ForeignKey('penguin.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False) buddy_id = db.Column(db.ForeignKey('penguin.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False, index=True) best_buddy = db.Column(db.Boolean, nullable=False, server_default=db.text("false"))
class PenguinStamp(db.Model): __tablename__ = 'penguin_stamp' penguin_id = db.Column(db.ForeignKey('penguin.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False) stamp_id = db.Column(db.ForeignKey('stamp.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False) recent = db.Column(db.Boolean, nullable=False, server_default=db.text("true"))
class PenguinCard(db.Model): __tablename__ = 'penguin_card' penguin_id = db.Column(db.ForeignKey('penguin.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False, index=True) card_id = db.Column(db.ForeignKey('card.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False) quantity = db.Column(db.SmallInteger, nullable=False, server_default=db.text("1"))
class PenguinPermission(db.Model): __tablename__ = 'penguin_permission' penguin_id = db.Column(db.ForeignKey(u'penguin.id', ondelete=u'CASCADE', onupdate=u'CASCADE'), primary_key=True) permission_id = db.Column(db.ForeignKey(u'permission.id', ondelete=u'CASCADE', onupdate=u'CASCADE'), nullable=False)
class CoverItem(db.Model): __tablename__ = 'cover_item' penguin_id = db.Column(db.ForeignKey('penguin.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False) item_id = db.Column(db.ForeignKey('item.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False) x = db.Column(db.SmallInteger, nullable=False, server_default=db.text("0")) y = db.Column(db.SmallInteger, nullable=False, server_default=db.text("0")) rotation = db.Column(db.SmallInteger, nullable=False, server_default=db.text("0")) depth = db.Column(db.SmallInteger, nullable=False, server_default=db.text("0"))
class RedemptionAwardCard(db.Model): __tablename__ = 'redemption_award_card' code_id = db.Column(db.ForeignKey('redemption_code.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False) card_id = db.Column(db.ForeignKey('card.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False)
class RedemptionAwardPuffleItem(db.Model): __tablename__ = 'redemption_award_puffle_item' code_id = db.Column(db.ForeignKey('redemption_code.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False) puffle_item_id = db.Column(db.ForeignKey('puffle_item.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False)
class RedemptionAwardFurniture(db.Model): __tablename__ = 'redemption_award_furniture' code_id = db.Column(db.ForeignKey('redemption_code.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False) furniture_id = db.Column(db.ForeignKey('furniture.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False)
class BuddyRequest(db.Model): __tablename__ = 'buddy_request' penguin_id = db.Column(db.ForeignKey('penguin.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False) requester_id = db.Column(db.ForeignKey('penguin.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False)
class RedemptionAwardFlooring(db.Model): __tablename__ = 'redemption_award_flooring' code_id = db.Column(db.ForeignKey('redemption_code.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False) flooring_id = db.Column(db.ForeignKey('flooring.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False)
class RedemptionAwardLocation(db.Model): __tablename__ = 'redemption_award_location' code_id = db.Column(db.ForeignKey('redemption_code.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False) location_id = db.Column(db.ForeignKey('location.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False)
class PenguinFlooring(db.Model): __tablename__ = 'penguin_flooring' penguin_id = db.Column(db.ForeignKey('penguin.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False) flooring_id = db.Column(db.ForeignKey('flooring.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False)
class PuffleTreasurePuffleItem(db.Model): __tablename__ = 'puffle_treasure_puffle_item' puffle_id = db.Column(db.ForeignKey('puffle.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False) puffle_item_id = db.Column(db.ForeignKey('puffle_item.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False)
class PuffleTreasureFurniture(db.Model): __tablename__ = 'puffle_treasure_furniture' puffle_id = db.Column(db.ForeignKey('puffle.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False) furniture_id = db.Column(db.ForeignKey('furniture.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False)
class IgnoreList(db.Model): __tablename__ = 'ignore_list' penguin_id = db.Column(db.ForeignKey('penguin.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False) ignore_id = db.Column(db.ForeignKey('penguin.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False, index=True)
class PenguinLocation(db.Model): __tablename__ = 'penguin_location' penguin_id = db.Column(db.ForeignKey('penguin.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False) location_id = db.Column(db.ForeignKey('location.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False)
class PenguinItem(db.Model): __tablename__ = 'penguin_item' penguin_id = db.Column(db.ForeignKey('penguin.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False) item_id = db.Column(db.ForeignKey('item.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False)
class RedemptionAwardIgloo(db.Model): __tablename__ = 'redemption_award_igloo' code_id = db.Column('CodeID', db.ForeignKey('redemption_code.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False) igloo_id = db.Column(db.ForeignKey('igloo.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False)
class QuestAwardItem(db.Model): __tablename__ = 'quest_award_item' quest_id = db.Column(db.ForeignKey('quest.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False) item_id = db.Column(db.ForeignKey('item.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False)
class QuestTask(db.Model): __tablename__ = 'quest_task' id = db.Column( db.Integer, primary_key=True, server_default=db.text("nextval('\"quest_id_seq\"'::regclass)")) quest_id = db.Column(db.ForeignKey('quest.id', ondelete='CASCADE', onupdate='CASCADE'), nullable=False) description = db.Column(db.String(50), nullable=False) room_id = db.Column( db.ForeignKey('room.id', ondelete='CASCADE', onupdate='CASCADE')) data = db.Column(db.String(50))
class PenguinFurniture(db.Model): __tablename__ = 'penguin_furniture' penguin_id = db.Column(db.ForeignKey('penguin.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False) furniture_id = db.Column(db.ForeignKey('furniture.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False) quantity = db.Column(db.SmallInteger, nullable=False, server_default=db.text("1"))
class PenguinPuffleItem(db.Model): __tablename__ = 'penguin_puffle_item' penguin_id = db.Column(db.ForeignKey('penguin.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False) item_id = db.Column(db.ForeignKey('puffle_item.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True, nullable=False) quantity = db.Column(db.SmallInteger, nullable=False, server_default=db.text("1"))