currency per column in table definition
This commit is contained in:
Binary file not shown.
@@ -22,8 +22,6 @@ pub struct AnalyticsTable {
|
||||
pub columns: ::prost::alloc::vec::Vec<AnalyticsCatalogColumn>,
|
||||
#[prost(message, repeated, tag = "4")]
|
||||
pub links: ::prost::alloc::vec::Vec<AnalyticsTableLink>,
|
||||
#[prost(string, tag = "5")]
|
||||
pub base_currency: ::prost::alloc::string::String,
|
||||
}
|
||||
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
|
||||
pub struct AnalyticsCatalogColumn {
|
||||
@@ -36,6 +34,9 @@ pub struct AnalyticsCatalogColumn {
|
||||
pub is_system: bool,
|
||||
#[prost(string, tag = "4")]
|
||||
pub rounding: ::prost::alloc::string::String,
|
||||
/// Canonical ISO-4217 code for MONEY; empty for every other type.
|
||||
#[prost(string, tag = "5")]
|
||||
pub currency: ::prost::alloc::string::String,
|
||||
}
|
||||
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
|
||||
pub struct AnalyticsTableLink {
|
||||
|
||||
@@ -42,9 +42,6 @@ pub struct PostTableDefinitionRequest {
|
||||
/// like "public", "information_schema", or ones starting with "pg\_".
|
||||
#[prost(string, tag = "5")]
|
||||
pub profile_name: ::prost::alloc::string::String,
|
||||
/// ISO-4217 base currency used by every MONEY column in this table.
|
||||
#[prost(string, tag = "6")]
|
||||
pub base_currency: ::prost::alloc::string::String,
|
||||
/// Columns whose values identify a row to users in pickers, in the order
|
||||
/// they are shown. Each must name one of the user-defined columns above.
|
||||
/// Empty means the row is identified by its id alone.
|
||||
@@ -53,7 +50,7 @@ pub struct PostTableDefinitionRequest {
|
||||
/// ISO-4217 currency the profile keeps its accounting in. A profile is one
|
||||
/// accounting entity and keeps one set of books, so this is required only when
|
||||
/// the request creates the profile, and is ignored afterwards. It is unrelated
|
||||
/// to base_currency: tables may hold money in any currency, and amounts convert
|
||||
/// to individual MONEY-column currencies: tables may hold money in any currency, and amounts convert
|
||||
/// to this one when they reach the ledger.
|
||||
#[prost(string, tag = "8")]
|
||||
pub accounting_currency: ::prost::alloc::string::String,
|
||||
@@ -80,8 +77,6 @@ pub struct CreateInvoiceTemplateTableRequest {
|
||||
pub table_name: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "3")]
|
||||
pub typst_source: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "4")]
|
||||
pub base_currency: ::prost::alloc::string::String,
|
||||
#[prost(string, repeated, tag = "5")]
|
||||
pub row_display_columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
|
||||
}
|
||||
@@ -125,9 +120,6 @@ pub struct AddTableColumnsRequest {
|
||||
/// Optional indexes for the new columns only.
|
||||
#[prost(string, repeated, tag = "4")]
|
||||
pub indexes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
|
||||
/// Required when adding the first MONEY column to a table.
|
||||
#[prost(string, tag = "5")]
|
||||
pub base_currency: ::prost::alloc::string::String,
|
||||
}
|
||||
/// Describes one user-defined column for a table.
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
@@ -147,7 +139,7 @@ pub struct ColumnDefinition {
|
||||
/// RAW_DATETIME (timezone-free civil datetime)
|
||||
/// PHONE (international or national phone number; generates extension/type/country/calling-code companions)
|
||||
/// TIME (timezone-free time of day)
|
||||
/// MONEY (= unconstrained NUMERIC; currency comes from the table)
|
||||
/// MONEY (= unconstrained NUMERIC; currency is declared below)
|
||||
/// ACCOUNTING (creates schema-managed name, account, debit, and credit fields;
|
||||
/// account always selects a row from the profile's managed accounts table;
|
||||
/// name is limited to 10 characters and one stored row contributes
|
||||
@@ -169,6 +161,10 @@ pub struct ColumnDefinition {
|
||||
/// profile quantity ledger.
|
||||
#[prost(bool, tag = "4")]
|
||||
pub quantity_ledger: bool,
|
||||
/// Canonical uppercase ISO-4217 currency code. Required for MONEY and forbidden
|
||||
/// for every other field type.
|
||||
#[prost(string, tag = "5")]
|
||||
pub currency: ::prost::alloc::string::String,
|
||||
}
|
||||
/// Response after table creation (success + DDL preview).
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
@@ -310,8 +306,6 @@ pub struct TableDetail {
|
||||
pub columns: ::prost::alloc::vec::Vec<ColumnDefinition>,
|
||||
#[prost(message, repeated, tag = "4")]
|
||||
pub scripts: ::prost::alloc::vec::Vec<ScriptInfo>,
|
||||
#[prost(string, tag = "5")]
|
||||
pub base_currency: ::prost::alloc::string::String,
|
||||
#[prost(string, repeated, tag = "6")]
|
||||
pub row_display_columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
|
||||
#[prost(map = "string, message", tag = "7")]
|
||||
|
||||
@@ -168,9 +168,9 @@ pub struct HydratedColumnValue {
|
||||
/// Logical database type used to create a typed client ScriptValue.
|
||||
#[prost(string, tag = "5")]
|
||||
pub field_type: ::prost::alloc::string::String,
|
||||
/// Related table's base currency for MONEY values; otherwise empty.
|
||||
/// Related MONEY column's currency; otherwise empty.
|
||||
#[prost(string, tag = "6")]
|
||||
pub base_currency: ::prost::alloc::string::String,
|
||||
pub currency: ::prost::alloc::string::String,
|
||||
}
|
||||
/// One declared related-collection aggregate input for the client Steel context.
|
||||
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
|
||||
@@ -194,9 +194,9 @@ pub struct HydratedAggregateValue {
|
||||
/// Logical source-column type; empty for row-only aggregates.
|
||||
#[prost(string, tag = "6")]
|
||||
pub field_type: ::prost::alloc::string::String,
|
||||
/// Aggregate table's base currency for MONEY values; otherwise empty.
|
||||
/// Aggregated MONEY column's currency; otherwise empty.
|
||||
#[prost(string, tag = "7")]
|
||||
pub base_currency: ::prost::alloc::string::String,
|
||||
pub currency: ::prost::alloc::string::String,
|
||||
}
|
||||
/// Complete external dependency snapshot for client-side Steel execution.
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
|
||||
Reference in New Issue
Block a user