Class: Core::Models::Campaigns::Invitation

Inherits:
Object
  • Object
show all
Includes:
Core::Models::Concerns::Enumerable, Core::Models::Concerns::Historizable, Mongoid::Document, Mongoid::Timestamps
Defined in:
lib/core/models/campaigns/invitation.rb

Overview

An invitation is the linked between a player and a campaign. It keeps the history of the interaction between the player and the campaign.

Author:

Instance Attribute Summary collapse

Method Summary

Methods included from Core::Models::Concerns::Historizable

#add_history

Instance Attribute Details

#accountCore::Models::Account

Returns the account the invitation has been issued to.

Returns:



20
# File 'lib/core/models/campaigns/invitation.rb', line 20

belongs_to :account, class_name: 'Core::Models::Account', inverse_of: :invitations

#campaignCore::Models::Campaign

Returns the campaign the invitation has been made in.

Returns:



23
# File 'lib/core/models/campaigns/invitation.rb', line 23

belongs_to :campaign, class_name: 'Core::Models::Campaign', inverse_of: :invitations

#statusSymbol

Returns the current status of the invitation.

Returns:

  • (Symbol)

    the current status of the invitation.



27
28
29
# File 'lib/core/models/campaigns/invitation.rb', line 27

historize enum_field :status,
[:pending, :request, :accepted, :refused, :expelled, :left, :master, :creator],
default: :pending