Automated Action 43235eb604 Create TechDating API backend
- Setup project structure and basic FastAPI application
- Define database models for users, profiles, matches, and messages
- Set up database connection and create Alembic migrations
- Implement user authentication and registration endpoints
- Create API endpoints for profile management, matches, and messaging
- Add filtering and search functionality for tech profiles
- Setup environment variable configuration
- Create README with project information and setup instructions
2025-05-28 15:17:44 +00:00

37 lines
752 B
Python

from pydantic import BaseModel, EmailStr, Field
from typing import Optional
from datetime import datetime
class UserBase(BaseModel):
email: Optional[EmailStr] = None
username: Optional[str] = None
is_active: Optional[bool] = True
class UserCreate(UserBase):
email: EmailStr
username: str = Field(..., min_length=3, max_length=50)
password: str = Field(..., min_length=8)
class UserUpdate(UserBase):
password: Optional[str] = Field(None, min_length=8)
class UserInDBBase(UserBase):
id: int
is_active: bool
created_at: datetime
updated_at: Optional[datetime] = None
class Config:
orm_mode = True
class User(UserInDBBase):
pass
class UserInDB(UserInDBBase):
hashed_password: str