Commit 64f434f6 by Marina

mudei o models

parent 30edf5cc
...@@ -4,8 +4,10 @@ db = SQLAlchemy() ...@@ -4,8 +4,10 @@ db = SQLAlchemy()
class Animal(db.Model): class Animal(db.Model):
id = db.Column(db.Integer, primary_key=True) id = db.Column(db.Integer, primary_key=True)
nome = db.Column(db.String(100)) nome = db.Column(db.String(100), nullable=False)
especie = db.Column(db.String(100)) especie = db.Column(db.String(100), nullable=False)
idade = db.Column(db.Integer) idade = db.Column(db.Integer)
peso = db.Column(db.Float) peso = db.Column(db.Float)
\ No newline at end of file def __repr__(self):
return f'<Animal {self.nome}>'
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment