File size: 1,678 Bytes
be86a81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
"""
Models Module

This module contains:
- SQLAlchemy ORM models for database tables
- Pydantic schemas for request/response validation
- Database connection management

SQLAlchemy Models:
- User: User accounts with password hashing
- Todo: Todo items with soft delete support
- Session: JWT refresh token management

Pydantic Schemas:
- TodoCreate: Input schema for creating todos
- TodoUpdate: Input schema for updating todos (all optional)
- TodoResponse: Output schema for todo objects
- UserResponse: Output schema for user objects
- ErrorResponse: Standardized error response schema
- PaginatedResponse: Standard wrapper for paginated lists
- MessageResponse: Simple success message
- DeleteResponse: Confirmation for delete operations
"""

# SQLAlchemy Models
from .models import (
    User,
    Todo,
    Session,
    TodoStatus,
    TodoPriority,
    UserRole,
)

# Database Connection
from .database import (
    Base,
    get_db,
    init_db,
    close_db,
)

# Pydantic Schemas (TODO: Update schemas.py for new schema)
from .schemas import (
    TodoStatus as SchemaTodoStatus,
    TodoPriority as SchemaTodoPriority,
    TodoCreate,
    TodoUpdate,
    TodoResponse,
    UserResponse,
    ErrorResponse,
    PaginatedResponse,
    MessageResponse,
    DeleteResponse,
)

__all__ = [
    # SQLAlchemy Models
    "User",
    "Todo",
    "Session",
    "TodoStatus",
    "TodoPriority",
    "UserRole",
    # Database
    "Base",
    "get_db",
    "init_db",
    "close_db",
    # Pydantic Schemas
    "TodoCreate",
    "TodoUpdate",
    "TodoResponse",
    "UserResponse",
    "ErrorResponse",
    "PaginatedResponse",
    "MessageResponse",
    "DeleteResponse",
]