diff --git a/common/proto/table_definition.proto b/common/proto/table_definition.proto index 4f2b4dc..b3572b3 100644 --- a/common/proto/table_definition.proto +++ b/common/proto/table_definition.proto @@ -99,20 +99,19 @@ message PostTableDefinitionRequest { string accounting_currency = 8; } -// Defines the input for explicitly creating a table backed by one invoice -// template. typst_source must contain exactly one declaration of the form: +// Defines the input for explicitly creating tables backed by one invoice +// template. typst_source must contain exactly one field declaration: // // #let komp_ac_fields = ( -// "invoice.number": (source: "local", field_type: "TEXT", write: "user"), -// "items[].product": (source: "reference", table: "stock", required: true), -// "items[].quantity": (source: "local", field_type: "DECIMAL(12,3)", write: "user"), -// "items[].total": (source: "local", field_type: "MONEY", write: "script"), +// "sidlo.nazov", +// "people[].name", +// "people[].requested_quantity", // ) // -// Root fields create columns and references on table_name. Every [] collection -// creates a child table with a required FK to its immediate parent; fields in -// that collection create columns and references on the child table. Multiple -// template paths in one scope may reuse the same reference. +// A path matching an existing profile table and column becomes a reference to +// that table. Otherwise its final segment becomes a local TEXT column for an +// administrator to refine later. Every [] creates a child table with a required +// FK to its immediate generated parent. message CreateInvoiceTemplateTableRequest { string profile_name = 1; string table_name = 2; diff --git a/common/src/proto/descriptor.bin b/common/src/proto/descriptor.bin index 92d12c8..339888c 100644 Binary files a/common/src/proto/descriptor.bin and b/common/src/proto/descriptor.bin differ diff --git a/common/src/proto/komp_ac.table_definition.rs b/common/src/proto/komp_ac.table_definition.rs index 99b3037..cd32352 100644 --- a/common/src/proto/komp_ac.table_definition.rs +++ b/common/src/proto/komp_ac.table_definition.rs @@ -58,20 +58,19 @@ pub struct PostTableDefinitionRequest { #[prost(string, tag = "8")] pub accounting_currency: ::prost::alloc::string::String, } -/// Defines the input for explicitly creating a table backed by one invoice -/// template. typst_source must contain exactly one declaration of the form: +/// Defines the input for explicitly creating tables backed by one invoice +/// template. typst_source must contain exactly one field declaration: /// /// \#let komp_ac_fields = ( -/// "invoice.number": (source: "local", field_type: "TEXT", write: "user"), -/// "items\[\].product": (source: "reference", table: "stock", required: true), -/// "items\[\].quantity": (source: "local", field_type: "DECIMAL(12,3)", write: "user"), -/// "items\[\].total": (source: "local", field_type: "MONEY", write: "script"), +/// "sidlo.nazov", +/// "people\[\].name", +/// "people\[\].requested_quantity", /// ) /// -/// Root fields create columns and references on table_name. Every \[\] collection -/// creates a child table with a required FK to its immediate parent; fields in -/// that collection create columns and references on the child table. Multiple -/// template paths in one scope may reuse the same reference. +/// A path matching an existing profile table and column becomes a reference to +/// that table. Otherwise its final segment becomes a local TEXT column for an +/// administrator to refine later. Every \[\] creates a child table with a required +/// FK to its immediate generated parent. #[derive(serde::Serialize, serde::Deserialize)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CreateInvoiceTemplateTableRequest { diff --git a/server b/server index 6d3ecbb..12ec132 160000 --- a/server +++ b/server @@ -1 +1 @@ -Subproject commit 6d3ecbb0700b780f743ab0e7cb2ad5b29e7c01a2 +Subproject commit 12ec13208e660d0ede7702811735b3bab45e9540