module transaction.model; import handy_httpd.components.optional; import std.datetime; import util.money; struct TransactionVendor { immutable ulong id; immutable string name; immutable string description; } struct TransactionCategory { immutable ulong id; immutable Optional!ulong parentId; immutable string name; immutable string description; immutable string color; } struct TransactionTag { immutable ulong id; immutable string name; } struct Transaction { immutable ulong id; /// The time at which the transaction happened. immutable SysTime timestamp; /// The time at which the transaction entity was saved. immutable SysTime addedAt; immutable ulong amount; immutable Currency currency; immutable string description; immutable Optional!ulong vendorId; immutable Optional!ulong categoryId; } struct TransactionLineItem { immutable ulong id; immutable ulong transactionId; immutable long valuePerItem; immutable ulong quantity; immutable uint idx; immutable string description; immutable Optional!ulong categoryId; }