created user settings in the settings page

This commit is contained in:
2025-04-17 10:00:46 +03:00
parent db465d6e4e
commit d3b29052e8
16 changed files with 478 additions and 28 deletions

10
py_app/app/models.py Normal file
View File

@@ -0,0 +1,10 @@
from . import db
class User(db.Model):
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String(80), unique=True, nullable=False)
password = db.Column(db.String(120), nullable=False)
role = db.Column(db.String(20), nullable=False) # Role: superadmin, administrator, quality, warehouse, scan
def __repr__(self):
return f'<User {self.username}>'