class Role
  include Mongoid::Document
  field :key, type: String
  field :title, type: String, localize: true
  field :built_in, type: Boolean, :default => false
  field :disabled, :type => Boolean, :default => false

  has_and_belongs_to_many :member_profiles
  has_many :authorizations
  embeds_many :role_fields
  has_many :role_statuses

  def is_built_in?
  	self.built_in
  end

  def is_disabled?
    self.disabled
  end
end