summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2023-12-21 18:03:58 -0600
committerHombreLaser <sebastian-440@live.com>2023-12-21 18:03:58 -0600
commitfa3884af00320ff48d2b891303b0e42c411039a4 (patch)
tree8bc4ab75ea52b5d0d581595766f39a43c8246aca /app/models
Initial commit
Diffstat (limited to 'app/models')
-rw-r--r--app/models/__init__.py0
-rw-r--r--app/models/user.py13
2 files changed, 13 insertions, 0 deletions
diff --git a/app/models/__init__.py b/app/models/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/app/models/__init__.py
diff --git a/app/models/user.py b/app/models/user.py
new file mode 100644
index 0000000..a76fb2e
--- /dev/null
+++ b/app/models/user.py
@@ -0,0 +1,13 @@
+from sqlalchemy import BigInteger, String, Date
+from sqlalchemy.orm import mapped_column
+from app.database import db
+
+class User(db.Model):
+ __tablename__ = 'users'
+
+ id = mapped_column(BigInteger, primary_key=True)
+ email = mapped_column(String, nullable=False)
+ first_name = mapped_column(String, nullable=False)
+ last_name = mapped_column(String, nullable=False)
+ role = mapped_column(String(10), nullable=False)
+ created_at = mapped_column(Date, nullable=False)