1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-28 17:52:43 +01:00
phorge-phorge/src/infrastructure/storage/lisk
epriestley f86f9dc512 Make Currency a more formal type
Summary:
Ref T2787. Phortune currently stores a bunch of stuff as `...inUSDCents`. This ends up being pretty cumbersome and I worry it will create a huge headache down the road (and possibly not that far off if we do Coinbase/Bitcoin soon). Even now, it's more of a pain than I figured it would be.

Instead:

  - Provide an application-level serialization mechanism.
  - Provide currency serialization.
  - Store currency in an abstract way (currently, as "1.23 USD") that can handle currencies in the future.
  - Change all `...inUSDCents` to `..asCurrency`.
  - This generally simplifies all the application code.
  - Also remove some columns which don't make sense or don't make sense anymore. Notably, `Product` is going to get more abstract and mostly be provided by applications.

Test Plan:
  - Created a new product.
  - Purchased a product.
  - Backed an initiative.
  - Ran unit tests.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D10633
2014-10-06 10:26:48 -07:00
..
__tests__ Apply some autofix linter rules 2014-09-10 06:55:05 +10:00
LiskDAO.php Support AUTO_INCREMENT in bin/storage adjust 2014-10-01 08:24:51 -07:00
LiskDAOSet.php Purge loadRelativeEdges 2013-09-13 11:40:52 -07:00
LiskEphemeralObjectException.php Delete license headers from files 2012-11-05 11:16:51 -08:00
LiskMigrationIterator.php Delete license headers from files 2012-11-05 11:16:51 -08:00
LiskRawMigrationIterator.php Add LiskRawMigrationIterator 2013-06-21 12:55:07 -07:00
PhabricatorDataNotAttachedException.php Show image dimensions and some other metadata in Differential 2014-08-13 14:41:06 -07:00
PhabricatorLiskDAO.php Make Currency a more formal type 2014-10-06 10:26:48 -07:00
PhabricatorLiskSerializer.php Make Currency a more formal type 2014-10-06 10:26:48 -07:00