Skip to content

multiple types of transactions #3

@YtvwlD

Description

@YtvwlD

We currently have a single type of transaction which appears under /audits:

{

    "id": 0,
    "created_at": "2017-09-27T18:45:15Z",
    "difference": 5,
    "product": 0

}

But there are actually at least two different types of transactions here:

  • buying a product (product specifies what was bought; difference is negative)
  • depositing money (product is None; difference is positive)
  • paying money ( product is None; difference is positive)

We distinguish these via the product and via the difference field.

But there can probably be more types:

I just wanted to hear your opinions about changing the data model of a transaction and how we could achieve transferring money.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions