class Lunch(db.Model): id = db.Column(db.Integer, primary_key=True) foodname = db.Column(db.String(100), nullable=False) mass = db.Column(db.Integer(), nullable=False) calories = db.Column(db.Integer(), nullable=False) protein = db.Column(db.Integer(), nullable=False) carbohydrates = db.Column(db.Integer(), nullable=False) fats = db.Column(db.Integer(), nullable=False) user_id = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False)
class Fitness(db.Model): id = db.Column(db.Integer, primary_key=True) exercisename = db.Column(db.String(100), nullable=False) duration = db.Column(db.Integer(), nullable=False) intensity = db.Column(db.String(100), nullable=False) calories = db.Column(db.Integer(), nullable=False) user_id = db.Column(db.Integer(), db.ForeignKey('user.id'), nullable=False) def __repr__(self): #How objects are printed return f"Fitness('{self.name}', '{self.duration}')"
class Food(db.Model): __searchable__ = ['name'] id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(100), nullable=False) mass = db.Column(db.Integer(), nullable=False) calories = db.Column(db.Integer(), nullable=False) protein = db.Column(db.Integer(), nullable=False) carbohydrates = db.Column(db.Integer(), nullable=False) fats = db.Column(db.Integer(), nullable=False) def __repr__(self): #How objects are printed return f"Food('{self.name}', '{self.mass}')"
class Fitness(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(100), nullable=False) duration = db.Column(db.Integer(), nullable=False) def __repr__(self): #How objects are printed return f"Fitness('{self.name}', '{self.duration}')"
class Food(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(100), nullable=False) mass = db.Column(db.Integer(), nullable=False) def __repr__(self): #How objects are printed return f"Food('{self.name}', '{self.mass}')"
class HealthTrack(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(100), nullable=False) heartrate = db.Column(db.Integer(), nullable=False)