Skip to content

Conversation

@thaninbew
Copy link
Collaborator

📝 Description

Fixed Enum Type Mismatches

  • Changed entity enums from numeric (0, 1) to string-based ('one_time', 'recurring')
  • Consolidated all enum definitions into donation.entity.ts as single source of truth
  • Updated 6 files to import enums from entity instead of duplicating them

Added Missing Database Fields

  • Added status field (DonationStatus enum: pending/completed/failed/cancelled)
  • Added transactionId field (nullable string for payment processor IDs)
  • Both fields now in entity and properly mapped in repository

Updated Migration

  • Changed donationType and recurringInterval from integer to varchar storage
  • Added status, transactionId, and showDedicationPublicly columns
  • Fixed table name to "donation" (singular, matches entity)
  • Added proper default values and timestamps

✔️ Verification

  • All 38 tests passing
  • Migration now matches entity

@thaninbew thaninbew self-assigned this Oct 13, 2025
Copy link
Contributor

@SamNie2027 SamNie2027 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Only thing I'd suggest to is to change 'completed' status to 'succeeded' as that's the status that Stripe uses

@thaninbew
Copy link
Collaborator Author

Looks good! Only thing I'd suggest to is to change 'completed' status to 'succeeded' as that's the status that Stripe uses

Will do, thank you for reviewing!

@thaninbew thaninbew merged commit 4b1718a into main Oct 15, 2025
4 checks passed
@thaninbew thaninbew deleted the consistency-improvements branch October 15, 2025 01:56
@thaninbew
Copy link
Collaborator Author

damn forgot to squash lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants