from main import db


class User(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    public_id = db.Column(db.String(50), unique=True)
    name = db.Column(db.String(50))
    password = db.Column(db.String(80))
    admin = db.Column(db.Boolean)
    key = db.Column(db.String(300))


# class File(db.Model):
#     id = db.Column(db.Integer, primary_key=True)
#     user_id = db.Column(db.Integer, db.ForeignKey("user.id"))
#     name = db.Column(db.String(300))
#     location = db.Column(db.String(300))


# ***for create database follow the instruction
# from main import db
# db.create_all()
