Class: LWS::Presence::Person

Inherits:
Generic::Model show all
Defined in:
lib/lws/apps/presence.rb

Overview

The person class

Instance Attribute Summary collapse

Attributes inherited from Generic::Model

#created_at, #id, #updated_at, #url, #url_html

Method Summary

Methods inherited from Generic::Model

#dig, #reload, #rollback, #save

Instance Attribute Details

#appointmentsArray<Appointment>

Returns the appointments involving the person.

Returns:

  • (Array<Appointment>)

    the appointments involving the person



360
# File 'lib/lws/apps/presence.rb', line 360

has_many :appointments

#companyLWS::Auth::Company

Returns the company the person belongs to.

Returns:



364
# File 'lib/lws/apps/presence.rb', line 364

belongs_to :company, class_name: "LWS::Auth::Company"

#company_idInteger

Returns the ID of the company the person belongs to.

Returns:

  • (Integer)

    the ID of the company the person belongs to



368
# File 'lib/lws/apps/presence.rb', line 368

attribute :company_id

#company_nameString

Note:

This is not the name of the company the person belongs to, but possibly a guest/visitor working for another company!

Returns the name of the company the person works for.

Returns:

  • (String)

    the name of the company the person works for



375
# File 'lib/lws/apps/presence.rb', line 375

attribute :company_name

#customer_referenceString?

Returns the customer specific reference for the person.

Returns:

  • (String, nil)

    the customer specific reference for the person



379
# File 'lib/lws/apps/presence.rb', line 379

attribute :customer_reference

#emailString?

Returns the email address of the person.

Returns:

  • (String, nil)

    the email address of the person



383
# File 'lib/lws/apps/presence.rb', line 383

attribute :email

#eroBoolean

Returns whether the person is emergency response ceritified.

Returns:

  • (Boolean)

    whether the person is emergency response ceritified



388
# File 'lib/lws/apps/presence.rb', line 388

attribute :ero

#extra_infoString?

Returns some extra info for the person.

Returns:

  • (String, nil)

    some extra info for the person



392
# File 'lib/lws/apps/presence.rb', line 392

attribute :extra_info

#import_refString?

Returns reference for storing the uid of the remote database.

Returns:

  • (String, nil)

    reference for storing the uid of the remote database



397
# File 'lib/lws/apps/presence.rb', line 397

attribute :import_ref

#kind"employee", "guest"

Returns the person kind.

Returns:

  • ("employee", "guest")

    the person kind



401
# File 'lib/lws/apps/presence.rb', line 401

attribute :kind

#last_syncString?

Returns the last date/time the status was updated via a device or RFID tag.

Returns:

  • (String, nil)

    the last date/time the status was updated via a device or RFID tag



406
# File 'lib/lws/apps/presence.rb', line 406

attribute :last_sync

#latFloat?

Returns the exact latitude of the person’s location.

Returns:

  • (Float, nil)

    the exact latitude of the person’s location



410
# File 'lib/lws/apps/presence.rb', line 410

attribute :lat

#locationLocation

Returns the location the person is located at.

Returns:

  • (Location)

    the location the person is located at



414
# File 'lib/lws/apps/presence.rb', line 414

belongs_to :location

#location_ancestors_idsArray<Integer>

Returns the IDs of the (nesting) locations the person is located at.

Returns:

  • (Array<Integer>)

    the IDs of the (nesting) locations the person is located at



419
# File 'lib/lws/apps/presence.rb', line 419

attribute :location_ancestor_ids

#location_idInteger

Returns the ID of the location the person is located at.

Returns:

  • (Integer)

    the ID of the location the person is located at



423
# File 'lib/lws/apps/presence.rb', line 423

attribute :location_id

#longFloat?

Returns the exact longitude of the person’s location.

Returns:

  • (Float, nil)

    the exact longitude of the person’s location



427
# File 'lib/lws/apps/presence.rb', line 427

attribute :long

#nameString

Returns the name of the person.

Returns:

  • (String)

    the name of the person



431
# File 'lib/lws/apps/presence.rb', line 431

attribute :name

#people_responsible_forArray<Person>

Returns the people the person is responsible for.

Returns:

  • (Array<Person>)

    the people the person is responsible for



435
# File 'lib/lws/apps/presence.rb', line 435

has_many :people_responsible_for, class_name: "LWS::Presence::Person"

#person_responsiblePerson?

Returns the person responsible for this person.

Returns:

  • (Person, nil)

    the person responsible for this person



439
440
441
# File 'lib/lws/apps/presence.rb', line 439

belongs_to :person_responsible, class_name: "LWS::Presence::Person",
foreign_key: "person_responsible_id",
uri: "people/:id"

#person_responsible_idInteger?

Returns the ID of the person responsible for this person.

Returns:

  • (Integer, nil)

    the ID of the person responsible for this person



445
# File 'lib/lws/apps/presence.rb', line 445

attribute :person_responsible_id

#phone_extensionString

Returns the fixed phonenumber extension of the person.

Returns:

  • (String)

    the fixed phonenumber extension of the person



449
# File 'lib/lws/apps/presence.rb', line 449

attribute :phone_extension

#phone_fixedString

Returns the fixed phonenumber of the person.

Returns:

  • (String)

    the fixed phonenumber of the person



453
# File 'lib/lws/apps/presence.rb', line 453

attribute :phone_fixed

#phone_mobileString

Returns the mobile phonenumber of the person.

Returns:

  • (String)

    the mobile phonenumber of the person



457
# File 'lib/lws/apps/presence.rb', line 457

attribute :phone_mobile

#picture_urlString?

Returns the URL of the picture of the person.

Returns:

  • (String, nil)

    the URL of the picture of the person



461
# File 'lib/lws/apps/presence.rb', line 461

attribute :picture_url

#presentBoolean

Returns if a person is present at a location. It looks at the state of a person so that local state checking is not needed.

Returns:

  • (Boolean)

    if a person is present at a location. It looks at the state of a person so that local state checking is not needed.



467
# File 'lib/lws/apps/presence.rb', line 467

attribute :present

#rfidString?

Returns the RFID tag ID linked to the person.

Returns:

  • (String, nil)

    the RFID tag ID linked to the person



471
# File 'lib/lws/apps/presence.rb', line 471

attribute :rfid

#status"available", ...

Returns the presence status of the person.

Returns:

  • ("available", "busy", "away", "disabled", nil)

    the presence status of the person



476
# File 'lib/lws/apps/presence.rb', line 476

attribute :status

#udidString?

Returns the unique device ID (e.g. of a mobile phone) linked to the person.

Returns:

  • (String, nil)

    the unique device ID (e.g. of a mobile phone) linked to the person



481
# File 'lib/lws/apps/presence.rb', line 481

attribute :udid

#vehicle_registration_plateString?

Returns The vehicle registration plate of the persons transport.

Returns:

  • (String, nil)

    The vehicle registration plate of the persons transport



486
# File 'lib/lws/apps/presence.rb', line 486

attribute :vehicle_registration_plate

#visibility"public", "private"

Returns if a person should be protected by not showing critical information.

Returns:

  • ("public", "private")

    if a person should be protected by not showing critical information



491
# File 'lib/lws/apps/presence.rb', line 491

attribute :visibility