Beispiel #1
0
class Step(BaseModel, db.Model):

    __tablename__ = 'step'

    sid = db.Column(db.INTEGER, primary_key=True, autoincrement=True)
    s_name = db.Column(db.VARCHAR, unique=True)
    s_detail = db.Column(db.VARCHAR)
Beispiel #2
0
class Ingredient(BaseModel, db.Model):

    __tablename__ = 'ingredient'

    iid = db.Column(db.INTEGER, primary_key=True, autoincrement=True)
    i_name = db.Column(db.VARCHAR, unique=True)
    ic_ids = db.Column(db.ARRAY(db.INTEGER))
    alt_names = db.Column(db.ARRAY(db.TEXT))
Beispiel #3
0
class Recipe(BaseModel, db.Model):

    __tablename__ = 'recipe'

    rid = db.Column(db.INTEGER, primary_key=True, autoincrement=True)
    r_name = db.Column(db.VARCHAR)
    r_description = db.Column(db.VARCHAR)
    i_id = db.Column(db.INTEGER, ForeignKey('ingredient.iid'))
    rc_id = db.Column(db.INTEGER, ForeignKey('recipe_category.rcid'))
    s_id = db.Column(db.INTEGER, ForeignKey('step.sid'))
Beispiel #4
0
class RecipeCategory(BaseModel, db.Model):

    __tablename__ = 'recipe_category'

    rcid = db.Column(db.INTEGER, primary_key=True, autoincrement=True)
    rc_name = db.Column(db.VARCHAR, unique=True)
Beispiel #5
0
class IngredientCategory(BaseModel, db.Model):

    __tablename__ = 'ingredient_category'

    icid = db.Column(db.INTEGER, primary_key=True, autoincrement=True)
    ic_name = db.Column(db.VARCHAR, unique=True)