cryogenic22 commited on
Commit
4f511d4
·
verified ·
1 Parent(s): 530591c

Create src/core/models/user.py

Browse files
Files changed (1) hide show
  1. src/core/models/user.py +13 -0
src/core/models/user.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # src/core/models/user.py
2
+ from sqlalchemy import Column, String, Enum
3
+ from .base import TimestampedModel
4
+
5
+ class User(TimestampedModel):
6
+ """User model for authentication"""
7
+ __tablename__ = 'users'
8
+
9
+ id = Column(String, primary_key=True)
10
+ email = Column(String, unique=True, nullable=False)
11
+ name = Column(String, nullable=False)
12
+ role = Column(Enum('sales_rep', 'regional_lead', 'head_of_sales', name='user_roles'))
13
+ hashed_password = Column(String, nullable=False)