# encoding: utf-8

class PageContext
  include Mongoid::Document
  include Mongoid::Timestamps
  include Mongoid::MultiParameterAttributes
  
  
  has_one :context, :class_name => "I18nVariable", :as => :language_value, :autosave => true, :dependent => :destroy

  field :create_user_id
  field :update_user_id
  field :version, :type => Integer , :default => 0
  
  field :archived, :type => Boolean, :default => false
  # field :current, :type => Boolean, :default => false
  
  belongs_to :page

  def is_top?
    self.is_top
  end
  
end