accounting kernel5 - locking

This commit is contained in:
Priec
2026-07-20 18:13:49 +02:00
parent 8b14e4d6d6
commit 8598af05e7
5 changed files with 101 additions and 2 deletions

View File

@@ -8,6 +8,10 @@ service Accounting {
// all supplied lines atomically when journal_id identifies an existing one.
rpc PostJournal(PostJournalRequest) returns (Journal);
// Permanently lock a balanced journal. This is an explicit action; becoming
// balanced never locks a journal automatically.
rpc LockJournal(LockJournalRequest) returns (Journal);
// Return journal lines and credits-minus-debits informational balance.
rpc GetJournal(GetJournalRequest) returns (Journal);
@@ -58,6 +62,11 @@ message JournalLineInput {
string description = 4;
}
message LockJournalRequest {
string profile_name = 1;
int64 journal_id = 2;
}
message GetJournalRequest {
string profile_name = 1;
int64 journal_id = 2;
@@ -149,4 +158,7 @@ message Journal {
string total_credit = 8;
// Informational difference calculated as credits minus debits.
string balance = 9;
bool locked = 10;
string locked_at = 11;
string locked_by_user_id = 12;
}