lowecase
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-02-13 20:39:14 +01:00
parent d64c8859af
commit c20b5f7c98
16 changed files with 0 additions and 0 deletions

16
mealapi/model/meal.py Normal file
View File

@@ -0,0 +1,16 @@
#!/usr/bin/env python3
from .db import db
from .mealingredient import MealIngredient
class Meal(db.Model):
__tablename__ = 'Meal'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(255), nullable=False)
description = db.Column(db.Text, nullable=False)
kcal = db.Column(db.Integer, nullable=True)
price = db.Column(db.Integer, nullable=True)
spicy = db.Column(db.Boolean, nullable=False, default=False)
vegan = db.Column(db.Boolean, nullable=False, default=False)
glutenfree = db.Column(db.Boolean, nullable=False, default=False)
ingredients = db.relationship('Ingredient', secondary=MealIngredient, back_populates='Meal')