class

PlaceOS::Model::SignageTemplate

Inherits Neuroplastic < PgORM::Timestamps < PgORM::Base < PgORM::Validators < PgORM::Table < PgORM::Persistence < PgORM::Associations < ActiveModel::Callbacks < ActiveModel::Validation < ActiveModel::Model < DB::Mappable < DB::Serializable < YAML::Serializable < JSON::Serializable < Reference < Object

positions widget plugins over a signage display, changing its layout. Attached to displays via SignageTemplate::SystemTemplate.

Constants

CALLBACKS = { before_save: [do if (__temp_1290 = @authority) && __temp_1290.new_record? __temp_1290.save self.authority_id = __temp_1290.id.not_nil! end end, do if (__temp_1291 = @background_item) && __temp_1291.new_record? __temp_1291.save self.background_item_id = __temp_1291.id.not_nil! end end, do if (__temp_1296 = @live_template) && __temp_1296.new_record? __temp_1296.save self.live_template_id = __temp_1296.id.not_nil! end end, :record_template_history] of Nil, after_save: [] of Nil, before_create: [do self.created_at = self.updated_at = Time.utc end] of Nil, after_create: [] of Nil, before_update: [do self.updated_at = Time.utc end] of Nil, after_update: [] of Nil, before_destroy: [] of Nil, after_destroy: [do end, do end, do end] of Nil, }

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

Log = ::Log.for(self)
PRIMARY_KEY_TYPES = {:id => UUID} of Nil => Nil

macro level key => type

PRIMARY_KEYS = [{:id}]

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

Constructors

from_json(string_or_io : String | IO, trusted : Bool = false) : self

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

from_json(string_or_io : String | IO, root : String, trusted : Bool = false) : self

Deserializes the given JSON in string_or_io into an instance of self, assuming the JSON consists of an JSON object with key root, and whose value is the value to deserialize. Will not deserialise from fields with mass_assign: false

class User < ActiveModel::Model
  attribute name : String
  attribute google_id : UUID, mass_assign: false
end

User.from_json(%({"main": {"name": "Jason", "google_id": "f6f70bfb-c882-446d-8758-7ce47db39620"}}), root: "main") # => #<User:0x103131b20 @name="Jason">
from_trusted_json(string_or_io : String | IO, root : String) : self

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

from_trusted_json(string_or_io : String | IO) : self

Serialize from a trusted JSON source

from_trusted_yaml(string_or_io : String | IO) : self

Serialize from a trusted YAML source

from_yaml(string_or_io : String | IO, trusted : Bool = false) : self

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

Source
new(pull : JSON::PullParser)

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

Source
new(rs : DB::ResultSet)

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

new(created_at : Time | ActiveModel::Model::None = ::ActiveModel::Model::None.new, updated_at : Time | ActiveModel::Model::None = ::ActiveModel::Model::None.new, id : UUID | ActiveModel::Model::None = ::ActiveModel::Model::None.new, name : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, description : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, tags : Array(String) | ActiveModel::Model::None = ::ActiveModel::Model::None.new, authority_id : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, background_item_id : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, layouts : Array(PlaceOS::Model::SignageTemplate::Layout) | ActiveModel::Model::None = ::ActiveModel::Model::None.new, full_screen_takeover : Bool | ActiveModel::Model::None = ::ActiveModel::Model::None.new, approval_requested : Bool | ActiveModel::Model::None = ::ActiveModel::Model::None.new, requested_by_id : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, approved : Bool | ActiveModel::Model::None = ::ActiveModel::Model::None.new, approved_by_id : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, approved_by_name : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, approved_by_email : PlaceOS::Model::Email | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, live_template_id : UUID | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new)

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

new(params : HTTP::Params | Hash(String, String) | Tuple(String, String))

Initialize PlaceOS::Model::SignageTemplate from HTTP::Params.

Class methods

attributes

Returns all attribute keys.

by_authority_id(id)
Source
by_background_item_id(id)
Source
by_live_template_id(id)
Source
changes(id : UUID | Nil = nil) : ChangeFeed

Changefeed at row (if id passed) or whole table level. Returns a ChangeFeed instance which can be used to invoke async callbacks via on or use blocking Iterator via each method.

elastic
from_rs(__temp_2416 : DB::ResultSet)

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

on_error(err : Exception | IO::Error)

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

primary_key

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

Source
table_name

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

Instance methods

after_create

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

after_destroy

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

after_initialize(trusted : Bool)

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

after_save

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

after_update

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

apply_defaults

Generate code to apply default values

approval_requested

approval_requested getter

approval_requested=(value : Bool)

approval_requested setter

approval_requested?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

approval_requested_assigned?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

approval_requested_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

approval_requested_changed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

approval_requested_default

approval_requested's default value

Source
approval_requested_present?
approval_requested_removed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

approval_requested_was

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

approval_requested_will_change!

Include approval_requested in the set of changed attributes, whether it has changed or not.

approve_draft!(user_model_who_approved : User) : SignageTemplate

promotes this draft onto the approved template it references: copies the display fields, records the approver on the live template and removes the draft โ€” all in a single transaction

Source
approved

approved getter

approved=(value : Bool)

approved setter

approved?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

approved_assigned?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

approved_by_email

approved_by_email getter

approved_by_email=(value : PlaceOS::Model::Email | Nil)

approved_by_email setter

approved_by_email_assigned?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

approved_by_email_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

approved_by_email_changed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

approved_by_email_default

approved_by_email's default value

Source
approved_by_email_present?
approved_by_email_removed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

approved_by_email_was

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

approved_by_email_will_change!

Include approved_by_email in the set of changed attributes, whether it has changed or not.

approved_by_id

approved_by_id getter

approved_by_id=(value : String | Nil)

approved_by_id setter

approved_by_id_assigned?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

approved_by_id_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

approved_by_id_changed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

approved_by_id_default

approved_by_id's default value

Source
approved_by_id_present?
approved_by_id_removed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

approved_by_id_was

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

approved_by_id_will_change!

Include approved_by_id in the set of changed attributes, whether it has changed or not.

approved_by_name

approved_by_name getter

approved_by_name=(value : String | Nil)

approved_by_name setter

approved_by_name_assigned?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

approved_by_name_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

approved_by_name_changed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

approved_by_name_default

approved_by_name's default value

Source
approved_by_name_present?
approved_by_name_removed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

approved_by_name_was

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

approved_by_name_will_change!

Include approved_by_name in the set of changed attributes, whether it has changed or not.

approved_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

approved_changed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

approved_default

approved's default value

Source
approved_present?
approved_removed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

approved_was

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

approved_will_change!

Include approved in the set of changed attributes, whether it has changed or not.

approver=(user)
Source
assign_attributes(created_at : Time | Missing = Missing, updated_at : Time | Missing = Missing, id : UUID | Missing = Missing, name : String | Missing = Missing, description : String | Nil | Missing = Missing, tags : Array(String) | Missing = Missing, authority_id : String | Missing = Missing, background_item_id : String | Nil | Missing = Missing, layouts : Array(PlaceOS::Model::SignageTemplate::Layout) | Missing = Missing, full_screen_takeover : Bool | Missing = Missing, approval_requested : Bool | Missing = Missing, requested_by_id : String | Nil | Missing = Missing, approved : Bool | Missing = Missing, approved_by_id : String | Nil | Missing = Missing, approved_by_name : String | Nil | Missing = Missing, approved_by_email : PlaceOS::Model::Email | Nil | Missing = Missing, live_template_id : UUID | Nil | Missing = Missing)

Assign to multiple attributes.

assign_attributes(params : HTTP::Params | Hash(String, String) | Tuple(String, String))

Assign to multiple attributes via HTTP::Params.

assign_attributes(model : PlaceOS::Model::SignageTemplate)

Assign to multiple attributes from a model object

assign_attributes_from_json(json, root : String)

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

assign_attributes_from_json(json)

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

assign_attributes_from_trusted_json(json, root : String)

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

assign_attributes_from_trusted_json(json)

Assign each field from JSON if field exists in JSON and has changed in model

assign_attributes_from_trusted_yaml(yaml)

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

assign_attributes_from_yaml(yaml)

Uses the YAML parser as JSON is valid YAML

attributes

Returns a Hash of all attribute values

attributes_tuple

Returns a NamedTuple of all attribute values.

authority
Source
authority!
Source
authority?
Source
authority_id

authority_id getter

authority_id=(value : String)

authority_id setter

authority_id?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

authority_id_assigned?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

authority_id_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

authority_id_changed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

authority_id_default

authority_id's default value

Source
authority_id_present?
authority_id_removed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

authority_id_was

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

authority_id_will_change!

Include authority_id in the set of changed attributes, whether it has changed or not.

background_item
Source
background_item!
Source
background_item?
Source
background_item_id

background_item_id getter

background_item_id=(value : String | Nil)

background_item_id setter

background_item_id_assigned?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

background_item_id_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

background_item_id_changed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

background_item_id_default

background_item_id's default value

Source
background_item_id_present?

optional media item rendered behind the widgets (cleared at the DB level if the item is deleted: ON DELETE SET NULL)

background_item_id_removed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

background_item_id_was

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

background_item_id_will_change!

Include background_item_id in the set of changed attributes, whether it has changed or not.

before_create

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

before_destroy

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

before_save

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

before_update

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

build_authority
Source
build_background_item
Source
build_live_template
Source
changed?

Check if any attributes have changed.

changed_attributes

Returns a Hash with all changed attributes.

changed_json(io : IO) : Nil

Serialize the set of changed attributes to JSON.

changed_json

Serialize the set of changed attributes to JSON.

changed_persist_attributes

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

changed_yaml(io : IO) : Nil

Serialize the set of changed attributes to YAML.

changed_yaml

Serialize the set of changed attributes to YAML.

clear_changes_information

Reset changes for all attributes.

create_authority
Source
create_authority!
Source
create_background_item
Source
create_background_item!
Source
create_live_template
Source
create_live_template!
Source
created_at

created_at getter

created_at=(value : Time)

Setters created_at setter

created_at?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

created_at_assigned?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

created_at_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

created_at_changed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

created_at_default

created_at's default value

created_at_present?
created_at_removed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

created_at_was

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

created_at_will_change!

Include created_at in the set of changed attributes, whether it has changed or not.

description

description getter

description=(value : String | Nil)

description setter

description_assigned?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

description_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

description_changed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

description_default

description's default value

Source
description_present?
description_removed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

description_was

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

description_will_change!

Include description in the set of changed attributes, whether it has changed or not.

draft?
Source
full_screen_takeover

full_screen_takeover getter

full_screen_takeover=(value : Bool)

full_screen_takeover setter

full_screen_takeover?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

full_screen_takeover_assigned?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

full_screen_takeover_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

full_screen_takeover_changed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

full_screen_takeover_default

full_screen_takeover's default value

Source
full_screen_takeover_present?
full_screen_takeover_removed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

full_screen_takeover_was

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

full_screen_takeover_will_change!

Include full_screen_takeover in the set of changed attributes, whether it has changed or not.

id

id getter

id=(value : UUID)

id setter

id?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

id_assigned?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

id_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

id_changed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

id_default

id's default value

id_present?
id_removed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

id_was

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

id_will_change!

Include id in the set of changed attributes, whether it has changed or not.

invoke_props

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

layouts

layouts getter

layouts setter

layouts?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

layouts_assigned?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

layouts_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

layouts_changed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

layouts_default

layouts's default value

Source
layouts_present?

widget placements, stored as a JSONB array. Not indexed in elastic.

layouts_removed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

layouts_was

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

layouts_will_change!

Include layouts in the set of changed attributes, whether it has changed or not.

live_template
Source
live_template!
Source
live_template?
Source
live_template_id

live_template_id getter

live_template_id=(value : UUID | Nil)

live_template_id setter

live_template_id_assigned?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

live_template_id_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

live_template_id_changed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

live_template_id_default

live_template_id's default value

Source
live_template_id_present?

approved templates should not be edited in place, so drafts are separate rows referencing the approved parent they were copied from. Drafts are removed at the DB level when the parent is deleted (ON DELETE CASCADE)

live_template_id_removed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

live_template_id_was

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

live_template_id_will_change!

Include live_template_id in the set of changed attributes, whether it has changed or not.

name

name getter

name=(value : String)

name setter

name?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

name_assigned?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

name_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

name_changed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

name_default

name's default value

Source
name_present?
name_removed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

name_was

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

name_will_change!

Include name in the set of changed attributes, whether it has changed or not.

persistent_attributes

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

primary_key

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

Source
primary_key_hash

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

reload_authority
Source
reload_authority?
Source
reload_background_item
Source
reload_background_item?
Source
reload_live_template
Source
reload_live_template?
Source
requested_by_id

requested_by_id getter

requested_by_id=(value : String | Nil)

requested_by_id setter

requested_by_id_assigned?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

requested_by_id_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

requested_by_id_changed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

requested_by_id_default

requested_by_id's default value

Source
requested_by_id_present?
requested_by_id_removed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

requested_by_id_was

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

requested_by_id_will_change!

Include requested_by_id in the set of changed attributes, whether it has changed or not.

restore_attributes

Reset each attribute to their previous values and clears all changes.

system_templates
Source
systems
Source
table_name

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

tags

tags getter

tags=(value : Array(String))

tags setter

tags?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

tags_assigned?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

tags_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

tags_changed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

tags_default

tags's default value

Source
tags_present?
tags_removed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

tags_was

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

tags_will_change!

Include tags in the set of changed attributes, whether it has changed or not.

updated_at

updated_at getter

updated_at=(value : Time)

updated_at setter

updated_at?

NOTE: use getter / getter! (not property / property!) so that the setter defined later in __create_initializer__ is the only setter on the field. Crystal's overload resolution silently fails to replace a property-defined setter with one of identical signature for generic types (e.g. Set(String)?, Array(String)?, String | Array(String)), although it does work for non-generic ones like String?. Defining the setter only once via __create_initializer__ ensures change tracking, sanitization, and custom setter blocks run uniformly across all types.

updated_at_assigned?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

updated_at_change

Returns a Tuple of the previous and the current value of an instance variable if it has changed

updated_at_changed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

updated_at_default

updated_at's default value

updated_at_present?
updated_at_removed?

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

updated_at_was

forward declare so this file can be required before signage_template.cr finishes defining the parent class (the attribute layouts : Array(Layout) line needs Layout resolved at macro-expansion time).

updated_at_will_change!

Include updated_at in the set of changed attributes, whether it has changed or not.

validate_nilability

Validate that all non-nillable fields have values.

zones
Source

Nested types