+class Encounter(TableBase):
+ __tablename__ = 'encounters'
+ id = Column(Integer, primary_key=True, nullable=False)
+ version_id = Column(Integer, ForeignKey('versions.id'), nullable=False, autoincrement=False)
+ location_area_id = Column(Integer, ForeignKey('location_areas.id'), nullable=False, autoincrement=False)
+ encounter_type_slot_id = Column(Integer, ForeignKey('encounter_type_slots.id'), nullable=False, autoincrement=False)
+ encounter_condition_id = Column(Integer, ForeignKey('encounter_conditions.id'), nullable=True, autoincrement=False)
+ pokemon_id = Column(Integer, ForeignKey('pokemon.id'), nullable=False, autoincrement=False)
+ min_level = Column(Integer, nullable=False, autoincrement=False)
+ max_level = Column(Integer, nullable=False, autoincrement=False)
+
+class EncounterCondition(TableBase):
+ __tablename__ = 'encounter_conditions'
+ id = Column(Integer, primary_key=True, nullable=False)
+ encounter_condition_group_id = Column(Integer, ForeignKey('encounter_condition_groups.id'), primary_key=False, nullable=False, autoincrement=False)
+ name = Column(Unicode(64), nullable=False)
+
+class EncounterConditionGroup(TableBase):
+ __tablename__ = 'encounter_condition_groups'
+ id = Column(Integer, primary_key=True, nullable=False)
+ name = Column(Unicode(64), nullable=False)
+
+class EncounterType(TableBase):
+ __tablename__ = 'encounter_types'
+ id = Column(Integer, primary_key=True, nullable=False)
+ name = Column(Unicode(64), nullable=False)
+
+class EncounterTypeSlot(TableBase):
+ __tablename__ = 'encounter_type_slots'
+ id = Column(Integer, primary_key=True, nullable=False)
+ encounter_type_id = Column(Integer, ForeignKey('encounter_types.id'), primary_key=False, nullable=False, autoincrement=False)
+ encounter_condition_group_id = Column(Integer, ForeignKey('encounter_condition_groups.id'), primary_key=False, nullable=True, autoincrement=False)
+ rarity = Column(Integer, nullable=False, autoincrement=False)
+