[RFC] Possibly extract DonationPayment out of Donation
Closed, ResolvedPublic1 Story Points

Description

Donation has a lot of fields:

  • id
  • status
  • amount
  • interval
  • paymentType
  • bankTransferCode
  • optsIntoNewsletter
  • donor
  • bankData
  • trackingInfo (which has a TODO to be removed out of the domain)

I propose to extract some as follows:

Donation

  • id
  • status
  • DonationPayment
  • optsIntoNewsletter
  • donor
  • trackingInfo (which has a TODO to be removed out of the domain)

DonationPayment

  • amount
  • interval
  • paymentType
  • bankTransferCode
  • bankData

Thoughts?

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 9 2016, 3:24 AM
JeroenDeDauw updated the task description. (Show Details)Apr 9 2016, 3:26 AM
JeroenDeDauw renamed this task from Donation question to Possibly extract DonationPayment out of Donation.Apr 9 2016, 3:28 AM
JeroenDeDauw changed the point value for this task from 0 to 1.
JeroenDeDauw moved this task from Backlog to Doing on the WMDE-Fundraising-Frontend-Release board.
JeroenDeDauw renamed this task from Possibly extract DonationPayment out of Donation to [RFC] Possibly extract DonationPayment out of Donation.

Do you mean in the FundraisingStore or in the application?

Also, BankData only applies to direct debit, bankTransferCode only applies to bank transfer, so maybe we need different subclasses of payments, each with a getter but no setter for paymentType? Or is that thinking too much ahead?

This is about the domain of our application.

Also, BankData only applies to direct debit, bankTransferCode only applies to bank transfer, so maybe we need different subclasses of payments, each with a getter but no setter for paymentType? Or is that thinking too much ahead?

I was also thinking about this a bit. I'm not sure how that would break down though. Amount seems to be a general thing all payment types have. What about interval? If that is also general, then perhaps having a single DonationPayment, with a paymentStuff field, and different types of payment stuffs is best. Do you know which concepts the domain experts, ie the fundraising people, use here?

Or is that thinking too much ahead?

What part is thinking ahead about this? This is all about properly modeling the current domain no?

Tobi_WMDE_SW closed this task as Resolved.Apr 7 2017, 11:25 AM
Tobi_WMDE_SW claimed this task.
Restricted Application added a project: WMDE-Fun-Team. · View Herald TranscriptApr 7 2017, 11:25 AM