add template variables

This commit is contained in:
Pete Matsyburka
2025-09-12 12:17:26 +03:00
parent b58ce1b571
commit 8e8e5e0e29
10 changed files with 45 additions and 20 deletions
+4
View File
@@ -15,6 +15,8 @@
# template_fields :text
# template_schema :text
# template_submitters :text
# variables :text
# variables_schema :text
# created_at :datetime not null
# updated_at :datetime not null
# account_id :bigint not null
@@ -50,6 +52,8 @@ class Submission < ApplicationRecord
serialize :template_fields, coder: JSON
serialize :template_schema, coder: JSON
serialize :template_submitters, coder: JSON
serialize :variables_schema, coder: JSON
serialize :variables, coder: JSON
serialize :preferences, coder: JSON
attribute :source, :string, default: 'link'
+18 -16
View File
@@ -4,22 +4,23 @@
#
# Table name: templates
#
# id :bigint not null, primary key
# archived_at :datetime
# fields :text not null
# name :string not null
# preferences :text not null
# schema :text not null
# shared_link :boolean default(FALSE), not null
# slug :string not null
# source :text not null
# submitters :text not null
# created_at :datetime not null
# updated_at :datetime not null
# account_id :bigint not null
# author_id :bigint not null
# external_id :string
# folder_id :bigint not null
# id :bigint not null, primary key
# archived_at :datetime
# fields :text not null
# name :string not null
# preferences :text not null
# schema :text not null
# shared_link :boolean default(FALSE), not null
# slug :string not null
# source :text not null
# submitters :text not null
# variables_schema :text
# created_at :datetime not null
# updated_at :datetime not null
# account_id :bigint not null
# author_id :bigint not null
# external_id :string
# folder_id :bigint not null
#
# Indexes
#
@@ -57,6 +58,7 @@ class Template < ApplicationRecord
serialize :preferences, coder: JSON
serialize :fields, coder: JSON
serialize :variables_schema, coder: JSON
serialize :schema, coder: JSON
serialize :submitters, coder: JSON