[FEATURE]: Membership Fee 1 - Database Schema & Ash Domain Foundation #275

Open
opened 2025-12-11 15:45:24 +01:00 by moritz · 0 comments
Owner

Goal: Create the database schema and Ash domain structure for membership fees.

Scope:

  • Create Mv.MembershipFees Ash domain
  • Create database migrations for:
    • membership_fee_types table
    • membership_fee_cycles table
    • Extend members table with membership_fee_type_id and membership_fee_start_date
  • Create Ash resources: MembershipFeeType and MembershipFeeCycle (skeleton only, no business logic)
  • Set up foreign key relationships with proper CASCADE/RESTRICT behaviors
  • Add database indexes as specified in architecture document

Files to Create/Modify:

  • lib/membership_fees/membership_fees.ex - New Ash domain
  • lib/membership_fees/membership_fee_type.ex - Resource skeleton
  • lib/membership_fees/membership_fee_cycle.ex - Resource skeleton
  • Migration files for tables and member extensions
  • Update lib/membership/member.ex to add relationships

Tests to Write:

  • Integration Tests:
    • Can create membership_fee_types record via Ash
    • Can create membership_fee_cycles record via Ash
    • Foreign key CASCADE works (deleting member deletes cycles)
    • Foreign key RESTRICT works (cannot delete type if cycles exist)
    • Member can be extended with membership fee fields

Acceptance Criteria:

  • All database tables created with correct schema
  • All foreign keys and constraints in place
  • All indexes created
  • Ash domain compiles without errors
  • Resources can be instantiated (even if actions don't work yet)
**Goal:** Create the database schema and Ash domain structure for membership fees. **Scope:** - Create `Mv.MembershipFees` Ash domain - Create database migrations for: - `membership_fee_types` table - `membership_fee_cycles` table - Extend `members` table with `membership_fee_type_id` and `membership_fee_start_date` - Create Ash resources: `MembershipFeeType` and `MembershipFeeCycle` (skeleton only, no business logic) - Set up foreign key relationships with proper CASCADE/RESTRICT behaviors - Add database indexes as specified in architecture document **Files to Create/Modify:** - `lib/membership_fees/membership_fees.ex` - New Ash domain - `lib/membership_fees/membership_fee_type.ex` - Resource skeleton - `lib/membership_fees/membership_fee_cycle.ex` - Resource skeleton - Migration files for tables and member extensions - Update `lib/membership/member.ex` to add relationships **Tests to Write:** - **Integration Tests:** - Can create `membership_fee_types` record via Ash - Can create `membership_fee_cycles` record via Ash - Foreign key CASCADE works (deleting member deletes cycles) - Foreign key RESTRICT works (cannot delete type if cycles exist) - Member can be extended with membership fee fields **Acceptance Criteria:** - All database tables created with correct schema - All foreign keys and constraints in place - All indexes created - Ash domain compiles without errors - Resources can be instantiated (even if actions don't work yet)
moritz added this to the Membership Fees milestone 2025-12-11 15:45:24 +01:00
moritz added the
medium priority
M
labels 2025-12-11 15:45:24 +01:00
moritz self-assigned this 2025-12-11 15:45:24 +01:00
moritz added this to the Sprint 10: 11.12-08.01 project 2025-12-11 15:45:24 +01:00
moritz changed title from [FEATURE]: Membership Fee - Database Schema & Ash Domain Foundation to [FEATURE]: Membership Fee 1 - Database Schema & Ash Domain Foundation 2025-12-11 15:50:06 +01:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: local-it/mitgliederverwaltung#275
No description provided.