
- 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
44 lines
790 B
Python
44 lines
790 B
Python
from pydantic import BaseModel
|
|
from typing import Optional
|
|
from datetime import datetime
|
|
from enum import Enum
|
|
|
|
|
|
class MatchStatusEnum(str, Enum):
|
|
pending = "pending"
|
|
accepted = "accepted"
|
|
rejected = "rejected"
|
|
|
|
|
|
class MatchBase(BaseModel):
|
|
sender_id: Optional[int] = None
|
|
receiver_id: Optional[int] = None
|
|
status: Optional[MatchStatusEnum] = None
|
|
|
|
|
|
class MatchCreate(MatchBase):
|
|
receiver_id: int
|
|
|
|
|
|
class MatchUpdate(MatchBase):
|
|
status: MatchStatusEnum
|
|
|
|
|
|
class MatchInDBBase(MatchBase):
|
|
id: int
|
|
sender_id: int
|
|
receiver_id: int
|
|
status: MatchStatusEnum
|
|
created_at: datetime
|
|
updated_at: Optional[datetime] = None
|
|
|
|
class Config:
|
|
orm_mode = True
|
|
|
|
|
|
class Match(MatchInDBBase):
|
|
pass
|
|
|
|
|
|
class MatchInDB(MatchInDBBase):
|
|
pass |