diff --git a/models.py b/models.py new file mode 100644 index 0000000000000000000000000000000000000000..791b7ddccce4be5c409293df71b8a71cf53c121a --- /dev/null +++ b/models.py @@ -0,0 +1,15 @@ +from flask import Flask +from flask_sqlalchemy import SQLAlchemy + +db = SQLAlchemy() + + +class Element(db.Model) + id = db.Column(db.INTEGER, primary_key=True) + element_name = db.Column(db.String(50), unique=True, nullable=False) + +class Label(db.Model) + id = db.Column(db.INTEGER, primary_key=True) + label_name = db.Column(db.String(50), unique=True, nullable=False) + father_id = db.Column(db.INTEGER, db.ForeignKey('label.id')) +