Introduce generic Transaction data model #28

Open
opened 2024-11-21 12:29:59 +01:00 by magicfelix · 0 comments
Member

Ideas for models (similar to https://ledger-cli.org/):
Specific use-cases like Invoices and Payments could be built on this data model.
Having a common base enables complex reporting and a wide range of use-cases.

Payee (maybe there is a better name?):
  has either a person or organisation linked. Or maybe polymorphic and PersonPayee and OrganisationPayee?

Account:
  client: Client
  name: String
  description: String (blank: True)
  parent: Account (null: True)
  constraints: (name, parent) unique

Transaction:
  date: date
  payee: Payee
  note: str

Posting:
  transaction: Transaction
  account: Account
  amount: Amount
  date: Date (blank: True)
  code: String (blank: True)
  related_transaction: Transaction (null: True)

Commodity:
  name: str
  description: str

Amount:
  number: float
  commodity: Commodity
Ideas for models (similar to https://ledger-cli.org/): Specific use-cases like [Invoices and Payments](https://edugit.org/AlekSIS/onboarding/AlekSIS-App-Tezor/-/issues/26) could be built on this data model. Having a common base enables complex reporting and a wide range of use-cases. ```plain Payee (maybe there is a better name?): has either a person or organisation linked. Or maybe polymorphic and PersonPayee and OrganisationPayee? Account: client: Client name: String description: String (blank: True) parent: Account (null: True) constraints: (name, parent) unique Transaction: date: date payee: Payee note: str Posting: transaction: Transaction account: Account amount: Amount date: Date (blank: True) code: String (blank: True) related_transaction: Transaction (null: True) Commodity: name: str description: str Amount: number: float commodity: Commodity ```
Sign in to join this conversation.
No milestone
No project
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
aleksis/AlekSIS-App-Tezor#28
No description provided.