class PlaceOS::Model::AiIncident

Included Modules

Defined in:

placeos-models/ai_incident.cr

Constant Summary

CALLBACKS = {before_save: [] 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: [:destroy_events, :destroy_reports, :destroy_agent_runs, :destroy_approval_requests, :destroy_report_deliveries, :destroy_verification_runs, :destroy_escalation_records, :destroy_feedback] of Nil, after_destroy: [] of Nil}
Log = ::Log.for(self)
PRIMARY_KEY_TYPES = {:id => (String | Nil)} of Nil => Nil

macro level key => type

PRIMARY_KEYS = [{:id}]

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from class PlaceOS::Model::ModelBase

after_create after_create, after_destroy after_destroy, after_save after_save, after_update after_update, apply_defaults apply_defaults, assign_attributes(params : HTTP::Params | Hash(String, String) | Tuple(String, String))
assign_attributes(model : PlaceOS::Model::ModelBase)
assign_attributes
assign_attributes
, attributes attributes, attributes_tuple attributes_tuple, before_create before_create, before_destroy before_destroy, before_save before_save, before_update before_update, invoke_props invoke_props, persistent_attributes persistent_attributes, primary_key primary_key

Constructor methods inherited from class PlaceOS::Model::ModelBase

new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
new(pull : JSON::PullParser)
new(rs : DB::ResultSet)
new

Class methods inherited from class PlaceOS::Model::ModelBase

attributes : Array(Symbol) attributes, changefeed_ignored_update_columns : Array(String) | Nil changefeed_ignored_update_columns, from_rs(rs : DB::ResultSet) from_rs, primary_key primary_key

Instance methods inherited from module PlaceOS::Model::Associations

format_list_for_postgres(list : Enumerable(String)) : String format_list_for_postgres, reset_associations reset_associations

Class methods inherited from module PlaceOS::Model::Associations

format_list_for_postgres(list : Enumerable(String)) : String format_list_for_postgres

Macros inherited from module PlaceOS::Model::Associations

belongs_to(parent_class, dependent = :none, association_name = nil, foreign_key = nil, presence = false, pk_type = nil, serialize = true) belongs_to, has_many(child_class, collection_name = nil, dependent = :none, foreign_key = nil, serialize = false) has_many, has_one(child_class, dependent = :none, association_name = nil, presence = false) has_one

Constructor Detail

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

def self.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">

def self.from_trusted_json(string_or_io : String | IO, root : String) : self #

def self.from_trusted_json(string_or_io : String | IO) : self #

Serialize from a trusted JSON source


def self.from_trusted_yaml(string_or_io : String | IO) : self #

Serialize from a trusted YAML source


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

def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]
def self.new(rs : DB::ResultSet) #

def self.new(created_at : Time | ActiveModel::Model::None = ::ActiveModel::Model::None.new, updated_at : Time | ActiveModel::Model::None = ::ActiveModel::Model::None.new, status : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, severity : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, source : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, classification : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, confidence : Float64 | ActiveModel::Model::None = ::ActiveModel::Model::None.new, summary : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, correlation_key : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, report_schema_version : String | ActiveModel::Model::None = ::ActiveModel::Model::None.new, tenant_id : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, system_id : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, module_id : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, module_name : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, module_index : Int32 | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, duplicate_count : Int32 | ActiveModel::Model::None = ::ActiveModel::Model::None.new, last_seen_at : Time | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, resolved_at : Time | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, claim_token : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, claim_expires_at : Time | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new, id : String | Nil | ActiveModel::Model::None = ::ActiveModel::Model::None.new) #

def self.new(params : HTTP::Params | Hash(String, String) | Tuple(String, String)) #

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


Class Method Detail

def self.attributes : Array(Symbol) #

Returns all attribute keys.


def self.changefeed_ignored_update_columns : Array(String) | Nil #

def self.changes(id : String | Nil | 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.


def self.elastic #

def self.from_rs(__temp_1890 : DB::ResultSet) #

def self.on_error(err : Exception | IO::Error) #

def self.primary_key #
Description copied from class PlaceOS::Model::ModelBase

Base class for all Engine models


[View source]
def self.table_name #

Instance Method Detail

def after_create #
Description copied from class PlaceOS::Model::ModelBase

Base class for all Engine models


def after_destroy #
Description copied from class PlaceOS::Model::ModelBase

Base class for all Engine models


def after_initialize(trusted : Bool) #

def after_save #
Description copied from class PlaceOS::Model::ModelBase

Base class for all Engine models


def after_update #
Description copied from class PlaceOS::Model::ModelBase

Base class for all Engine models


def agent_runs #

[View source]
def apply_defaults #

Generate code to apply default values


def approval_requests #

[View source]
def assign_attributes(created_at : Time | Missing = Missing, updated_at : Time | Missing = Missing, status : String | Missing = Missing, severity : String | Missing = Missing, source : String | Missing = Missing, classification : String | Missing = Missing, confidence : Float64 | Missing = Missing, summary : String | Missing = Missing, correlation_key : String | Missing = Missing, report_schema_version : String | Missing = Missing, tenant_id : String | Nil | Missing = Missing, system_id : String | Nil | Missing = Missing, module_id : String | Nil | Missing = Missing, module_name : String | Nil | Missing = Missing, module_index : Int32 | Nil | Missing = Missing, duplicate_count : Int32 | Missing = Missing, last_seen_at : Time | Nil | Missing = Missing, resolved_at : Time | Nil | Missing = Missing, claim_token : String | Nil | Missing = Missing, claim_expires_at : Time | Nil | Missing = Missing, id : String | Nil | Missing = Missing) #

Assign to multiple attributes.


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

Assign to multiple attributes via HTTP::Params.


def assign_attributes(model : PlaceOS::Model::AiIncident) #

Assign to multiple attributes from a model object


def assign_attributes_from_json(json, root : String) #

def assign_attributes_from_json(json) #

def assign_attributes_from_trusted_json(json, root : String) #

def assign_attributes_from_trusted_json(json) #

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


def assign_attributes_from_trusted_yaml(yaml) #

def assign_attributes_from_yaml(yaml) #

Uses the YAML parser as JSON is valid YAML


def attributes #

Returns a Hash of all attribute values


def attributes_json(io : IO) : Nil #

Serialize attributes to JSON, without any other properties to_json may include, as .from_json expects them.

Values are serialized as in to_json, applying any attribute converters.


def attributes_json(json : JSON::Builder) : Nil #

Serialize attributes to JSON, without any other properties to_json may include, as .from_json expects them.

Values are serialized as in to_json, applying any attribute converters.


def attributes_json : String #

Serialize attributes to JSON, without any other properties to_json may include, as .from_json expects them.

Values are serialized as in to_json, applying any attribute converters.


def attributes_tuple #

Returns a NamedTuple of all attribute values.


def before_create #
Description copied from class PlaceOS::Model::ModelBase

Base class for all Engine models


def before_destroy #
Description copied from class PlaceOS::Model::ModelBase

Base class for all Engine models


def before_save #
Description copied from class PlaceOS::Model::ModelBase

Base class for all Engine models


def before_update #
Description copied from class PlaceOS::Model::ModelBase

Base class for all Engine models


def changed? #

Check if any attributes have changed.


def changed_attributes #

Returns a Hash with all changed attributes.


def changed_json(io : IO) : Nil #

Serialize the set of changed attributes to JSON.


def changed_json : String #

Serialize the set of changed attributes to JSON.


def changed_persist_attributes #

def changed_yaml(io : IO) : Nil #

Serialize the set of changed attributes to YAML.


def changed_yaml : String #

Serialize the set of changed attributes to YAML.


def changes #

Returns a Hash of changed attributes, mapping each to a {previous, current} tuple.


def changes_json(io : IO) : Nil #

Serialize changed attributes to JSON as {"attribute": [previous, current]}.

Values are serialized as in to_json, applying any attribute converters.


def changes_json(json : JSON::Builder) : Nil #

Serialize changed attributes to JSON as {"attribute": [previous, current]}.

Values are serialized as in to_json, applying any attribute converters.


def changes_json : String #

Serialize changed attributes to JSON as {"attribute": [previous, current]}.

Values are serialized as in to_json, applying any attribute converters.


def claim_expires_at : Time | Nil #

def claim_expires_at=(value : Time | Nil) #

def claim_expires_at_assigned? : Bool #

def claim_expires_at_change : Tuple(Time | Nil | Nil, Time | Nil | Nil) | Nil #

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


def claim_expires_at_changed? : Bool #

def claim_expires_at_default : Time | Nil #

#claim_expires_at's default value


[View source]
def claim_expires_at_present? : Bool #

def claim_expires_at_removed? : Bool #

def claim_expires_at_was : Time | Nil | Nil #

def claim_expires_at_will_change! : Nil #

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


def claim_token : String | Nil #

#claim_token getter


def claim_token=(value : String | Nil) #

#claim_token setter


def claim_token_assigned? : Bool #

def claim_token_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


def claim_token_changed? : Bool #

def claim_token_default : String | Nil #

#claim_token's default value


[View source]
def claim_token_present? : Bool #

def claim_token_removed? : Bool #

def claim_token_was : String | Nil | Nil #

def claim_token_will_change! : Nil #

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


def classification : String #

def classification=(value : String) #

def classification? : String | Nil #

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.


def classification_assigned? : Bool #

def classification_change : Tuple(String | Nil, String | Nil) | Nil #

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


def classification_changed? : Bool #

def classification_default : String #

#classification's default value


[View source]
def classification_present? : Bool #

def classification_removed? : Bool #

def classification_was : String | Nil #

def classification_will_change! : Nil #

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


def clear_changes_information #

Reset changes for all attributes.


def confidence : Float64 #

#confidence getter


def confidence=(value : Float64) #

#confidence setter


def confidence? : Float64 | Nil #

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.


def confidence_assigned? : Bool #

def confidence_change : Tuple(Float64 | Nil, Float64 | Nil) | Nil #

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


def confidence_changed? : Bool #

def confidence_default : Float64 #

#confidence's default value


[View source]
def confidence_present? : Bool #

def confidence_removed? : Bool #

def confidence_was : Float64 | Nil #

def confidence_will_change! : Nil #

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


def correlation_key : String #

def correlation_key=(value : String) #

def correlation_key? : String | Nil #

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.


def correlation_key_assigned? : Bool #

def correlation_key_change : Tuple(String | Nil, String | Nil) | Nil #

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


def correlation_key_changed? : Bool #

def correlation_key_default : String #

#correlation_key's default value


[View source]
def correlation_key_present? : Bool #

def correlation_key_removed? : Bool #

def correlation_key_was : String | Nil #

def correlation_key_will_change! : Nil #

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


def created_at : Time #

#created_at getter


def created_at=(value : Time) #

Setters #created_at setter


def created_at? : Time | Nil #

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.


def created_at_assigned? : Bool #

def 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


def created_at_changed? : Bool #

def created_at_default : Time #

#created_at's default value


def created_at_present? : Bool #

def created_at_removed? : Bool #

def created_at_was : Time | Nil #

def created_at_will_change! : Nil #

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


def destroy_agent_runs #

def destroy_approval_requests #

def destroy_escalation_records #

def destroy_events #

def destroy_feedback #

def destroy_report_deliveries #

def destroy_reports #

def destroy_verification_runs #

def duplicate_count : Int32 #

def duplicate_count=(value : Int32) #

def duplicate_count? : Int32 | Nil #

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.


def duplicate_count_assigned? : Bool #

def duplicate_count_change : Tuple(Int32 | Nil, Int32 | Nil) | Nil #

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


def duplicate_count_changed? : Bool #

def duplicate_count_default : Int32 #

#duplicate_count's default value


[View source]
def duplicate_count_present? : Bool #

def duplicate_count_removed? : Bool #

def duplicate_count_was : Int32 | Nil #

def duplicate_count_will_change! : Nil #

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


def escalation_records #

[View source]
def events #

[View source]
def feedback #

[View source]
def id : String | Nil #

#id getter


def id=(value : String | Nil) #

#id setter


def id? #

def id_assigned? : Bool #

def 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


def id_changed? : Bool #

def id_default : String | Nil #

#id's default value


def id_present? : Bool #

def id_removed? : Bool #

def id_was : String | Nil | Nil #

def id_will_change! : Nil #

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


def invoke_props #
Description copied from class PlaceOS::Model::ModelBase

Base class for all Engine models


def last_seen_at : Time | Nil #

#last_seen_at getter


def last_seen_at=(value : Time | Nil) #

#last_seen_at setter


def last_seen_at_assigned? : Bool #

def last_seen_at_change : Tuple(Time | Nil | Nil, Time | Nil | Nil) | Nil #

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


def last_seen_at_changed? : Bool #

def last_seen_at_default : Time | Nil #

#last_seen_at's default value


[View source]
def last_seen_at_present? : Bool #

def last_seen_at_removed? : Bool #

def last_seen_at_was : Time | Nil | Nil #

def last_seen_at_will_change! : Nil #

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


def module_id : String | Nil #

#module_id getter


def module_id=(value : String | Nil) #

#module_id setter


def module_id_assigned? : Bool #

def module_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


def module_id_changed? : Bool #

def module_id_default : String | Nil #

#module_id's default value


[View source]
def module_id_present? : Bool #

def module_id_removed? : Bool #

def module_id_was : String | Nil | Nil #

def module_id_will_change! : Nil #

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


def module_index : Int32 | Nil #

#module_index getter


def module_index=(value : Int32 | Nil) #

#module_index setter


def module_index_assigned? : Bool #

def module_index_change : Tuple(Int32 | Nil | Nil, Int32 | Nil | Nil) | Nil #

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


def module_index_changed? : Bool #

def module_index_default : Int32 | Nil #

#module_index's default value


[View source]
def module_index_present? : Bool #

def module_index_removed? : Bool #

def module_index_was : Int32 | Nil | Nil #

def module_index_will_change! : Nil #

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


def module_name : String | Nil #

#module_name getter


def module_name=(value : String | Nil) #

#module_name setter


def module_name_assigned? : Bool #

def module_name_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


def module_name_changed? : Bool #

def module_name_default : String | Nil #

#module_name's default value


[View source]
def module_name_present? : Bool #

def module_name_removed? : Bool #

def module_name_was : String | Nil | Nil #

def module_name_will_change! : Nil #

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


def persistent_attributes #

Returns a Hash of all attributes that can be persisted.


def primary_key #
Description copied from class PlaceOS::Model::ModelBase

Base class for all Engine models


[View source]
def primary_key_hash #

def report_deliveries #

[View source]
def report_schema_version : String #

def report_schema_version=(value : String) #

def report_schema_version? : String | Nil #

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.


def report_schema_version_assigned? : Bool #

def report_schema_version_change : Tuple(String | Nil, String | Nil) | Nil #

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


def report_schema_version_changed? : Bool #

def report_schema_version_default : String #

#report_schema_version's default value


[View source]
def report_schema_version_present? : Bool #

def report_schema_version_removed? : Bool #

def report_schema_version_was : String | Nil #

def report_schema_version_will_change! : Nil #

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


def reports #

[View source]
def resolved_at : Time | Nil #

#resolved_at getter


def resolved_at=(value : Time | Nil) #

#resolved_at setter


def resolved_at_assigned? : Bool #

def resolved_at_change : Tuple(Time | Nil | Nil, Time | Nil | Nil) | Nil #

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


def resolved_at_changed? : Bool #

def resolved_at_default : Time | Nil #

#resolved_at's default value


[View source]
def resolved_at_present? : Bool #

def resolved_at_removed? : Bool #

def resolved_at_was : Time | Nil | Nil #

def resolved_at_will_change! : Nil #

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


def restore_attributes #

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


def severity : String #

#severity getter


def severity=(value : String) #

#severity setter


def severity? : String | Nil #

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.


def severity_assigned? : Bool #

def severity_change : Tuple(String | Nil, String | Nil) | Nil #

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


def severity_changed? : Bool #

def severity_default : String #

#severity's default value


[View source]
def severity_present? : Bool #

def severity_removed? : Bool #

def severity_was : String | Nil #

def severity_will_change! : Nil #

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


def source : String #

#source getter


def source=(value : String) #

#source setter


def source? : String | Nil #

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.


def source_assigned? : Bool #

def source_change : Tuple(String | Nil, String | Nil) | Nil #

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


def source_changed? : Bool #

def source_default : String #

#source's default value


[View source]
def source_present? : Bool #

def source_removed? : Bool #

def source_was : String | Nil #

def source_will_change! : Nil #

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


def status : String #

#status getter


def status=(value : String) #

#status setter


def status? : String | Nil #

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.


def status_assigned? : Bool #

def status_change : Tuple(String | Nil, String | Nil) | Nil #

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


def status_changed? : Bool #

def status_default : String #

#status's default value


[View source]
def status_present? : Bool #

def status_removed? : Bool #

def status_was : String | Nil #

def status_will_change! : Nil #

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


def summary : String #

#summary getter


def summary=(value : String) #

#summary setter


def summary? : String | Nil #

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.


def summary_assigned? : Bool #

def summary_change : Tuple(String | Nil, String | Nil) | Nil #

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


def summary_changed? : Bool #

def summary_default : String #

#summary's default value


[View source]
def summary_present? : Bool #

def summary_removed? : Bool #

def summary_was : String | Nil #

def summary_will_change! : Nil #

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


def system_id : String | Nil #

#system_id getter


def system_id=(value : String | Nil) #

#system_id setter


def system_id_assigned? : Bool #

def 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


def system_id_changed? : Bool #

def system_id_default : String | Nil #

#system_id's default value


[View source]
def system_id_present? : Bool #

def system_id_removed? : Bool #

def system_id_was : String | Nil | Nil #

def system_id_will_change! : Nil #

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


def table_name #

def tenant_id : String | Nil #

#tenant_id getter


def tenant_id=(value : String | Nil) #

#tenant_id setter


def tenant_id_assigned? : Bool #

def tenant_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


def tenant_id_changed? : Bool #

def tenant_id_default : String | Nil #

#tenant_id's default value


[View source]
def tenant_id_present? : Bool #

def tenant_id_removed? : Bool #

def tenant_id_was : String | Nil | Nil #

def tenant_id_will_change! : Nil #

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


def updated_at : Time #

#updated_at getter


def updated_at=(value : Time) #

#updated_at setter


def updated_at? : Time | Nil #

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.


def updated_at_assigned? : Bool #

def 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


def updated_at_changed? : Bool #

def updated_at_default : Time #

#updated_at's default value


def updated_at_present? : Bool #

def updated_at_removed? : Bool #

def updated_at_was : Time | Nil #

def updated_at_will_change! : Nil #

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


def validate_nilability #

Validate that all non-nillable fields have values.


def verification_runs #

[View source]