diff --git a/app/models/pet.py b/app/models/pet.py index b4df0df..8218c3d 100644 --- a/app/models/pet.py +++ b/app/models/pet.py @@ -11,5 +11,7 @@ class Pet(db.Model): location = mapped_column(db.String(255), nullable=False) sex = mapped_column(db.String(1), nullable=False) height = mapped_column(db.Float, default=0, nullable=False) + registrar_id = mapped_column(db.Integer, db.ForeignKey('user.id'), nullable=False) registration_date = mapped_column(db.DateTime, default=datetime.datetime.utcnow, nullable=False) - kind = relationship("PetKind") \ No newline at end of file + kind = relationship("PetKind") + registrar = relationship("User") \ No newline at end of file