2 Commits
Author SHA1 Message Date
gurixandClaude 5053b80998 feat: Add organization member support with memberType field
Implements support for both individual persons and organizations as members.

Changes:
- Added MemberType enum (INDIVIDUAL, ORGANIZATION) to distinguish member types
- Added member_type column to database (defaults to INDIVIDUAL for backward compatibility)
- Added company_name field for organizations
- Made first_name nullable (required for individuals, optional for organizations)
- Implemented conditional validation:
  - INDIVIDUAL members require first_name
  - ORGANIZATION members require company_name
- Updated GraphQL schema with new memberType and companyName fields
- Updated all resolvers to handle new fields and validation
- Added comprehensive unit tests for validation logic
- Updated existing tests to work with new fields
- All 53 tests passing

Technical notes:
- Using memberType instead of 'kind' to avoid GraphQL introspection conflicts
- Using native_enum=False for SQLite compatibility
- Using batch_alter_table for SQLite ALTER COLUMN compatibility
- Backward compatible: existing members automatically become INDIVIDUAL type

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 12:15:55 +01:00
gurixandClaude 1559c48104 feat: implement GraphQL member management API
Implement complete member management system with GraphQL API per OpenSpec proposal.
Only firstName is required; all other fields are optional with conditional validation.

Key features:
- GraphQL CRUD operations (create, read, update, delete members)
- SQLAlchemy 2.0 async with SQLite database
- Alembic database migrations
- Conditional validation (email/phone validated only when provided)
- Member fields: firstName (required), lastName, address, email, phone (all optional)
- Database seed script with sample member
- FastAPI with Strawberry GraphQL integration

Implementation details:
- Python 3.11+ with uv package manager
- Async database sessions throughout
- Proper error handling and validation
- Code quality: black, isort, ruff
- Comprehensive end-to-end testing completed

All 20 tasks from OpenSpec proposal completed successfully.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 12:21:13 +01:00