Torma Kristóf
fd5a2f6794
All checks were successful
continuous-integration/drone/push Build is passing
11 lines
363 B
Python
11 lines
363 B
Python
#!/usr/bin/env python3
|
|
from .db import db
|
|
|
|
|
|
class Ingredient(db.Model):
|
|
__tablename__ = 'Ingredient'
|
|
id = db.Column(db.Integer, primary_key=True)
|
|
name = db.Column(db.String(255), nullable=False, unique=True)
|
|
meal_id = db.Column(db.Integer, db.ForeignKey('Meal.id'))
|
|
meal = db.relationship('Meal', back_populates='ingredients', lazy='dynamic')
|