File size: 488 Bytes
4f511d4
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# src/core/models/user.py
from sqlalchemy import Column, String, Enum
from .base import TimestampedModel

class User(TimestampedModel):
    """User model for authentication"""
    __tablename__ = 'users'

    id = Column(String, primary_key=True)
    email = Column(String, unique=True, nullable=False)
    name = Column(String, nullable=False)
    role = Column(Enum('sales_rep', 'regional_lead', 'head_of_sales', name='user_roles'))
    hashed_password = Column(String, nullable=False)