Hmmm, I studied the data model while I was studying accounting. If Google doesn't give you an answer, maybe this will be the way to go.
The most basic book is 3 tables: accounts, parties and transactions. All transactions must be in a batch. Some people make two columns for debit and credit, I always made one column, with debits and loans with opposite signs.
. /-. , . , - , .
:)