- Introduced schemas for organizations, including creation, updates, and responses. - Created models for `Organization` and `UserOrganization` with role-based access control and relationships. - Implemented admin APIs for managing users, organizations, and bulk actions. - Added advanced filtering, sorting, and pagination for user and organization queries. - Updated `CRUD` logic to support organization-specific operations and member management. - Enhanced database with necessary indexes and validation for improved performance and data integrity.
19 lines
556 B
Python
19 lines
556 B
Python
"""
|
|
Models package initialization.
|
|
Imports all models to ensure they're registered with SQLAlchemy.
|
|
"""
|
|
# First import Base to avoid circular imports
|
|
from app.core.database import Base
|
|
from .base import TimestampMixin, UUIDMixin
|
|
|
|
# Import models
|
|
from .user import User
|
|
from .user_session import UserSession
|
|
from .organization import Organization
|
|
from .user_organization import UserOrganization, OrganizationRole
|
|
|
|
__all__ = [
|
|
'Base', 'TimestampMixin', 'UUIDMixin',
|
|
'User', 'UserSession',
|
|
'Organization', 'UserOrganization', 'OrganizationRole',
|
|
] |