accounts are strings in the client side
This commit is contained in:
@@ -76,7 +76,8 @@ service Accounting {
|
||||
|
||||
message EnsureAccountRequest {
|
||||
string profile_name = 1;
|
||||
repeated string segments = 2;
|
||||
// Slash-delimited root-to-leaf account path, for example "123/12/1".
|
||||
string account = 2;
|
||||
// Currency accepted by source postings to the leaf account. Empty uses the
|
||||
// profile accounting currency. Missing ancestors are created in the profile
|
||||
// accounting currency.
|
||||
@@ -87,9 +88,8 @@ message Account {
|
||||
int64 id = 1;
|
||||
optional int64 parent_account_id = 2;
|
||||
string segment = 3;
|
||||
// Root-to-leaf path of this account. Same shape as the request that created
|
||||
// it; the server never joins segments into a delimited code.
|
||||
repeated string segments = 4;
|
||||
// Slash-delimited root-to-leaf account path.
|
||||
string account = 4;
|
||||
string denomination_currency = 5;
|
||||
}
|
||||
|
||||
@@ -161,9 +161,8 @@ message PostJournalRequest {
|
||||
|
||||
message JournalLineInput {
|
||||
JournalSide side = 1;
|
||||
// Parsed account path segments. The client owns presentation parsing; the
|
||||
// server accepts no delimiter-encoded account string.
|
||||
repeated string account_segments = 2;
|
||||
// Slash-delimited root-to-leaf account path.
|
||||
string account = 2;
|
||||
string amount = 3;
|
||||
string description = 4;
|
||||
}
|
||||
@@ -281,8 +280,8 @@ message JournalLine {
|
||||
int64 id = 1;
|
||||
int32 line_number = 2;
|
||||
JournalSide side = 3;
|
||||
// Root-to-leaf path of the posted account, as sent on JournalLineInput.
|
||||
repeated string account_segments = 4;
|
||||
// Slash-delimited root-to-leaf path of the posted account.
|
||||
string account = 4;
|
||||
string amount = 5;
|
||||
string description = 6;
|
||||
bool deleted = 7;
|
||||
@@ -379,8 +378,8 @@ message ListPeriodBalancesRequest {
|
||||
|
||||
message PeriodBalance {
|
||||
int64 period_id = 1;
|
||||
// Root-to-leaf path of the account this frozen balance belongs to.
|
||||
repeated string account_segments = 2;
|
||||
// Slash-delimited root-to-leaf path of this frozen balance's account.
|
||||
string account = 2;
|
||||
string currency = 3;
|
||||
// Signed nets use debit-positive convention.
|
||||
string opening_balance = 4;
|
||||
@@ -393,7 +392,7 @@ message PeriodDenominationBalance {
|
||||
int64 period_id = 1;
|
||||
// Exact denominated account. Unlike book balances, this quantity is not
|
||||
// rolled up into parent accounts with a different denomination.
|
||||
repeated string account_segments = 2;
|
||||
string account = 2;
|
||||
string denomination_currency = 3;
|
||||
// Signed nets use debit-positive convention and remain in the denomination
|
||||
// currency without conversion during carry-forward.
|
||||
@@ -424,13 +423,13 @@ message MapOpeningBalanceAccountRequest {
|
||||
// Open period whose profile receives the opening balance. Its configured
|
||||
// previous_period_id identifies the source profile and period.
|
||||
int64 target_period_id = 1;
|
||||
repeated string source_account_segments = 2;
|
||||
repeated string target_account_segments = 3;
|
||||
string source_account = 2;
|
||||
string target_account = 3;
|
||||
}
|
||||
|
||||
message UnmapOpeningBalanceAccountRequest {
|
||||
int64 target_period_id = 1;
|
||||
repeated string target_account_segments = 2;
|
||||
string target_account = 2;
|
||||
}
|
||||
|
||||
message UnmapOpeningBalanceAccountResponse {
|
||||
@@ -453,9 +452,9 @@ message OpeningBalanceAccountMapping {
|
||||
int64 target_period_id = 1;
|
||||
int64 source_period_id = 2;
|
||||
string source_profile_name = 3;
|
||||
repeated string source_account_segments = 4;
|
||||
string source_account = 4;
|
||||
string target_profile_name = 5;
|
||||
repeated string target_account_segments = 6;
|
||||
string target_account = 6;
|
||||
string currency = 7;
|
||||
// Signed balances use the debit-positive convention.
|
||||
string opening_balance = 8;
|
||||
@@ -478,7 +477,7 @@ message OpeningBalanceAccountMapping {
|
||||
message UnmappedSourceBalance {
|
||||
int64 source_period_id = 1;
|
||||
string source_profile_name = 2;
|
||||
repeated string source_account_segments = 3;
|
||||
string source_account = 3;
|
||||
string currency = 4;
|
||||
// Signed portion not covered by a mapping, using the debit-positive
|
||||
// convention. This is never zero and may be less than the account's
|
||||
@@ -490,7 +489,7 @@ message UnmappedSourceBalance {
|
||||
message UnmappedSourceDenominationBalance {
|
||||
int64 source_period_id = 1;
|
||||
string source_profile_name = 2;
|
||||
repeated string source_account_segments = 3;
|
||||
string source_account = 3;
|
||||
string denomination_currency = 4;
|
||||
// Exact foreign-currency quantity that no mapping carries forward.
|
||||
string unmapped_quantity = 5;
|
||||
|
||||
@@ -46,14 +46,14 @@ message GetTableStructureResponse {
|
||||
message TableStructureResponse {
|
||||
// Columns of the physical table, including system columns (id, deleted,
|
||||
// created_at, row_revision), user-defined columns, and any foreign-key columns such as
|
||||
// named by whoever declared each link, plus the dedicated "account_id" on
|
||||
// named by whoever declared each link, plus the dedicated "account" on
|
||||
// ACCOUNTING-enabled tables. May be empty if the physical table is missing.
|
||||
repeated TableColumn columns = 1;
|
||||
}
|
||||
|
||||
// One physical column entry as reported by information_schema.
|
||||
message TableColumn {
|
||||
// Column name exactly as defined in PostgreSQL.
|
||||
// Public column name. Physical account_id columns are exposed as account.
|
||||
string name = 1;
|
||||
|
||||
// Normalized data type string derived from information_schema:
|
||||
|
||||
@@ -62,7 +62,7 @@ service TablesData {
|
||||
// - Validates profile and table definition
|
||||
// - Returns all columns as strings (COALESCE(col::TEXT, '') AS col)
|
||||
// including: id, deleted, row_revision, all user-defined columns, and FK columns
|
||||
// named by whoever declared each link, plus "account_id" on
|
||||
// named by whoever declared each link, plus "account" on
|
||||
// ACCOUNTING-enabled tables
|
||||
// - Fails with NOT_FOUND if record does not exist or is soft-deleted
|
||||
// - If the physical table is missing but the definition exists, returns INTERNAL
|
||||
@@ -102,7 +102,7 @@ message PostTableDataRequest {
|
||||
// - System/FK columns:
|
||||
// • "deleted" (BOOLEAN), optional; default FALSE if not provided
|
||||
// • one BIGINT per link, named by whoever declared it
|
||||
// • "account_id" (BIGINT) on ACCOUNTING-enabled tables
|
||||
// • "account" (slash-delimited account string) on ACCOUNTING-enabled tables
|
||||
//
|
||||
// Type expectations by SQL type:
|
||||
// - TEXT: string value; empty string is treated as NULL
|
||||
@@ -251,7 +251,7 @@ message GetTableDataResponse {
|
||||
// - id, deleted
|
||||
// - all user-defined columns from the table definition
|
||||
// - one column per link, named by whoever declared it
|
||||
// - account_id for ACCOUNTING-enabled tables
|
||||
// - account for ACCOUNTING-enabled tables
|
||||
//
|
||||
// All values are returned as TEXT via col::TEXT and COALESCEed to empty string
|
||||
// (NULL becomes ""). The row is returned only if deleted = FALSE.
|
||||
|
||||
Reference in New Issue
Block a user