Class: Core::Models::Campaigns::Invitation
- Inherits:
-
Object
- Object
- Core::Models::Campaigns::Invitation
- 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.
Instance Attribute Summary collapse
-
#account ⇒ Core::Models::Account
The account the invitation has been issued to.
-
#campaign ⇒ Core::Models::Campaign
The campaign the invitation has been made in.
-
#status ⇒ Symbol
The current status of the invitation.
Method Summary
Methods included from Core::Models::Concerns::Historizable
Instance Attribute Details
#account ⇒ Core::Models::Account
Returns the account the invitation has been issued to.
20 |
# File 'lib/core/models/campaigns/invitation.rb', line 20 belongs_to :account, class_name: 'Core::Models::Account', inverse_of: :invitations |
#campaign ⇒ Core::Models::Campaign
Returns the campaign the invitation has been made in.
23 |
# File 'lib/core/models/campaigns/invitation.rb', line 23 belongs_to :campaign, class_name: 'Core::Models::Campaign', inverse_of: :invitations |
#status ⇒ Symbol
Returns 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 |