junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
class
PlaceOS::Model::SignageTemplate::SystemTemplate
- PlaceOS::Model::SignageTemplate::SystemTemplate
- PgORM::Base
- ActiveModel::Model
- Reference
- Object
Overview
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
Included Modules
- PgORM::Timestamps
Defined in:
placeos-models/signage_template/system_template.crConstant Summary
-
CALLBACKS =
{before_save: [do if (__temp_1452 = @control_system) && __temp_1452.new_record? __temp_1452.save self.control_system_id = __temp_1452.id.not_nil! end end, do if (__temp_1453 = @zone) && __temp_1453.new_record? __temp_1453.save self.zone_id = __temp_1453.id.not_nil! end end, do if (__temp_1455 = @template) && __temp_1455.new_record? __temp_1455.save self.template_id = __temp_1455.id.not_nil! end end] 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} -
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two). A row with a
#scheduleshows the template during that schedule; a row without one is the default template for the pairing (at most one, enforced by a partial unique index). Surrogate UUID pk as the same template may be attached to the same system or zone multiple times with different schedules. -
PRIMARY_KEY_TYPES =
{:id => UUID} of Nil => Nil -
macro level key => type
-
PRIMARY_KEYS =
[{:id}] -
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two). A row with a
#scheduleshows the template during that schedule; a row without one is the default template for the pairing (at most one, enforced by a partial unique index). Surrogate UUID pk as the same template may be attached to the same system or zone multiple times with different schedules.
Constructors
-
.from_json(string_or_io : String | IO, trusted : Bool = false) : self
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
.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. -
.from_trusted_json(string_or_io : String | IO, root : String) : self
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
.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
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
.new(pull : JSON::PullParser)
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
.new(rs : DB::ResultSet)
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
.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, control_system_id : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, zone_id : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, template_id : UUID | ActiveModel::Model::None = ::ActiveModel::Model::None.new, schedule : PlaceOS::Model::Playlist::Schedule | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new)
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
.new(params : HTTP::Params | Hash(String, String) | Tuple(String, String))
Initialize PlaceOS::Model::SignageTemplate::SystemTemplate from
HTTP::Params.
Class Method Summary
-
.attributes : Array(Symbol)
Returns all attribute keys.
- .by_control_system_id(id)
- .by_template_id(id)
- .by_zone_id(id)
-
.changes(id : UUID | Nil = nil) : ChangeFeed
Changefeed at row (if
#idpassed) or whole table level. -
.from_rs(__temp_2600 : DB::ResultSet)
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
.on_error(err : Exception | IO::Error)
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
.primary_key
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
.table_name
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
Instance Method Summary
-
#after_create
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#after_destroy
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#after_initialize(trusted : Bool)
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#after_save
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#after_update
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#apply_defaults
Generate code to apply default values
-
#assign_attributes(created_at : Time | Missing = Missing, updated_at : Time | Missing = Missing, id : UUID | Missing = Missing, control_system_id : String | Nil | Missing = Missing, zone_id : String | Nil | Missing = Missing, template_id : UUID | Missing = Missing, schedule : PlaceOS::Model::Playlist::Schedule | 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::SystemTemplate)
Assign to multiple attributes from a model object
-
#assign_attributes_from_json(json, root : String)
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#assign_attributes_from_json(json)
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#assign_attributes_from_trusted_json(json, root : String)
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#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)
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#assign_attributes_from_yaml(yaml)
Uses the YAML parser as JSON is valid YAML
-
#attributes
Returns a
Hashof all attribute values -
#attributes_tuple
Returns a
NamedTupleof all attribute values. -
#before_create
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#before_destroy
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#before_save
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#before_update
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
- #build_control_system(**attributes) : PlaceOS::Model::ControlSystem
- #build_template(**attributes) : PlaceOS::Model::SignageTemplate
- #build_zone(**attributes) : PlaceOS::Model::Zone
-
#changed?
Check if any attributes have changed.
-
#changed_attributes
Returns a
Hashwith all changed attributes. -
#changed_json(io : IO) : Nil
Serialize the set of changed attributes to JSON.
-
#changed_json : String
Serialize the set of changed attributes to JSON.
-
#changed_persist_attributes
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#changed_yaml(io : IO) : Nil
Serialize the set of changed attributes to YAML.
-
#changed_yaml : String
Serialize the set of changed attributes to YAML.
-
#clear_changes_information
Reset changes for all attributes.
- #control_system : PlaceOS::Model::ControlSystem
- #control_system! : PlaceOS::Model::ControlSystem
- #control_system=(record : PlaceOS::Model::ControlSystem) : PlaceOS::Model::ControlSystem
- #control_system? : PlaceOS::Model::ControlSystem | Nil
-
#control_system_id : String | Nil
#control_system_idgetter -
#control_system_id=(value : String | Nil)
#control_system_idsetter -
#control_system_id_assigned? : Bool
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#control_system_id_change : Tuple(String | Nil | Nil, String | Nil | Nil) | Nil
Returns a Tuple of the previous and the current value of an instance variable if it has changed
-
#control_system_id_changed? : Bool
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#control_system_id_default : String | Nil
#control_system_id's default value - #control_system_id_present? : Bool
-
#control_system_id_removed? : Bool
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#control_system_id_was : String | Nil | Nil
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#control_system_id_will_change! : Nil
Include
#control_system_idin the set of changed attributes, whether it has changed or not. - #create_control_system(**attributes) : PlaceOS::Model::ControlSystem
- #create_control_system!(**attributes) : PlaceOS::Model::ControlSystem
- #create_template(**attributes) : PlaceOS::Model::SignageTemplate
- #create_template!(**attributes) : PlaceOS::Model::SignageTemplate
- #create_zone(**attributes) : PlaceOS::Model::Zone
- #create_zone!(**attributes) : PlaceOS::Model::Zone
-
#created_at : Time
#created_atgetter -
#created_at=(value : Time)
Setters
#created_atsetter -
#created_at? : Time | Nil
NOTE use
getter/getter!(notproperty/property!) so that the setter defined later in__create_initializer__is the only setter on the field. -
#created_at_assigned? : Bool
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#created_at_change : Tuple(Time | Nil, Time | Nil) | Nil
Returns a Tuple of the previous and the current value of an instance variable if it has changed
-
#created_at_changed? : Bool
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#created_at_default : Time
#created_at's default value - #created_at_present? : Bool
-
#created_at_removed? : Bool
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#created_at_was : Time | Nil
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#created_at_will_change! : Nil
Include
#created_atin the set of changed attributes, whether it has changed or not. - #default? : Bool
-
#id : UUID
#idgetter -
#id=(value : UUID)
#idsetter -
#id?
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#id_assigned? : Bool
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#id_change : Tuple(UUID | Nil, UUID | Nil) | Nil
Returns a Tuple of the previous and the current value of an instance variable if it has changed
-
#id_changed? : Bool
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#id_default : UUID
#id's default value - #id_present? : Bool
-
#id_removed? : Bool
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#id_was : UUID | Nil
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#id_will_change! : Nil
Include
#idin the set of changed attributes, whether it has changed or not. -
#invoke_props
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#persistent_attributes
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#primary_key
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#primary_key_hash
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
- #reload_control_system : PlaceOS::Model::ControlSystem
- #reload_control_system? : PlaceOS::Model::ControlSystem | Nil
- #reload_template : PlaceOS::Model::SignageTemplate
- #reload_template? : PlaceOS::Model::SignageTemplate | Nil
- #reload_zone : PlaceOS::Model::Zone
- #reload_zone? : PlaceOS::Model::Zone | Nil
-
#restore_attributes
Reset each attribute to their previous values and clears all changes.
-
#schedule : PlaceOS::Model::Playlist::Schedule | Nil
#schedulegetter -
#schedule=(value : PlaceOS::Model::Playlist::Schedule | Nil)
#schedulesetter -
#schedule_assigned? : Bool
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#schedule_change : Tuple(PlaceOS::Model::Playlist::Schedule | Nil | Nil, PlaceOS::Model::Playlist::Schedule | Nil | Nil) | Nil
Returns a Tuple of the previous and the current value of an instance variable if it has changed
-
#schedule_changed? : Bool
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#schedule_default : Playlist::Schedule | Nil
#schedule's default value -
#schedule_present? : Bool
when the template applies; nil means this is the default template
-
#schedule_removed? : Bool
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#schedule_was : PlaceOS::Model::Playlist::Schedule | Nil | Nil
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#schedule_will_change! : Nil
Include
#schedulein the set of changed attributes, whether it has changed or not. -
#table_name
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
- #template : PlaceOS::Model::SignageTemplate
- #template! : PlaceOS::Model::SignageTemplate
- #template=(record : PlaceOS::Model::SignageTemplate) : PlaceOS::Model::SignageTemplate
- #template? : PlaceOS::Model::SignageTemplate | Nil
-
#template_id : UUID
#template_idgetter -
#template_id=(value : UUID)
#template_idsetter -
#template_id? : UUID | Nil
NOTE use
getter/getter!(notproperty/property!) so that the setter defined later in__create_initializer__is the only setter on the field. -
#template_id_assigned? : Bool
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#template_id_change : Tuple(UUID | Nil, UUID | Nil) | Nil
Returns a Tuple of the previous and the current value of an instance variable if it has changed
-
#template_id_changed? : Bool
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#template_id_default : UUID
#template_id's default value - #template_id_present? : Bool
-
#template_id_removed? : Bool
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#template_id_was : UUID | Nil
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#template_id_will_change! : Nil
Include
#template_idin the set of changed attributes, whether it has changed or not. -
#updated_at : Time
#updated_atgetter -
#updated_at=(value : Time)
#updated_atsetter -
#updated_at? : Time | Nil
NOTE use
getter/getter!(notproperty/property!) so that the setter defined later in__create_initializer__is the only setter on the field. -
#updated_at_assigned? : Bool
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#updated_at_change : Tuple(Time | Nil, Time | Nil) | Nil
Returns a Tuple of the previous and the current value of an instance variable if it has changed
-
#updated_at_changed? : Bool
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#updated_at_default : Time
#updated_at's default value - #updated_at_present? : Bool
-
#updated_at_removed? : Bool
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#updated_at_was : Time | Nil
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#updated_at_will_change! : Nil
Include
#updated_atin the set of changed attributes, whether it has changed or not. -
#validate_nilability
Validate that all non-nillable fields have values.
- #zone : PlaceOS::Model::Zone
- #zone! : PlaceOS::Model::Zone
- #zone=(record : PlaceOS::Model::Zone) : PlaceOS::Model::Zone
- #zone? : PlaceOS::Model::Zone | Nil
-
#zone_id : String | Nil
#zone_idgetter -
#zone_id=(value : String | Nil)
#zone_idsetter -
#zone_id_assigned? : Bool
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#zone_id_change : Tuple(String | Nil | Nil, String | Nil | Nil) | Nil
Returns a Tuple of the previous and the current value of an instance variable if it has changed
-
#zone_id_changed? : Bool
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#zone_id_default : String | Nil
#zone_id's default value - #zone_id_present? : Bool
-
#zone_id_removed? : Bool
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#zone_id_was : String | Nil | Nil
junction attaching a SignageTemplate to a ControlSystem or a Zone (exactly one of the two).
-
#zone_id_will_change! : Nil
Include
#zone_idin the set of changed attributes, whether it has changed or not.
Constructor Detail
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
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">
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
Serialize from a trusted JSON source
Serialize from a trusted YAML source
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
Initialize PlaceOS::Model::SignageTemplate::SystemTemplate from HTTP::Params.
Class Method Detail
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.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
Instance Method Detail
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
Assign to multiple attributes.
Assign to multiple attributes via HTTP::Params.
Assign to multiple attributes from a model object
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
Assign each field from JSON if field exists in JSON and has changed in model
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
Returns a Tuple of the previous and the current value of an instance variable if it has changed
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
Include #control_system_id in the set of changed attributes, whether it has changed or not.
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.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
Returns a Tuple of the previous and the current value of an instance variable if it has changed
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
Include #created_at in the set of changed attributes, whether it has changed or not.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
Returns a Tuple of the previous and the current value of an instance variable if it has changed
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
Include #id in the set of changed attributes, whether it has changed or not.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
Returns a Tuple of the previous and the current value of an instance variable if it has changed
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
Include #schedule in the set of changed attributes, whether it has changed or not.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
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.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
Returns a Tuple of the previous and the current value of an instance variable if it has changed
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
Include #template_id in the set of changed attributes, whether it has changed or not.
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.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
Returns a Tuple of the previous and the current value of an instance variable if it has changed
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
Include #updated_at in the set of changed attributes, whether it has changed or not.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
Returns a Tuple of the previous and the current value of an instance variable if it has changed
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.
junction attaching a SignageTemplate to a ControlSystem or a Zone
(exactly one of the two). A row with a #schedule shows the template
during that schedule; a row without one is the default template for the
pairing (at most one, enforced by a partial unique index). Surrogate
UUID pk as the same template may be attached to the same system or zone
multiple times with different schedules.