diff options
author | HombreLaser <sebastian-440@live.com> | 2023-12-21 18:03:58 -0600 |
---|---|---|
committer | HombreLaser <sebastian-440@live.com> | 2023-12-21 18:03:58 -0600 |
commit | fa3884af00320ff48d2b891303b0e42c411039a4 (patch) | |
tree | 8bc4ab75ea52b5d0d581595766f39a43c8246aca /app/models/user.py |
Initial commit
Diffstat (limited to 'app/models/user.py')
-rw-r--r-- | app/models/user.py | 13 |
1 files changed, 13 insertions, 0 deletions
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) |