# encoding:utf-8
class Session < ActiveRecord::Base
  has_paper_trail
  self.table_name = 'session'
  self.primary_key = "session_key"
  validates_presence_of :session_key

  rails_admin do
    navigation_label '系统会话管理'
    weight -35

    list do
      filters [:session_key]
      # include_all_fields
      field :session_key      
      field :session_expiry do
        formatted_value do
          Time.at(value)
        end
      end
    end
    show do
      # include_all_fields
      field :session_key      
      field :session_expiry do
        formatted_value do
          Time.at(value)
        end
      end
    end

    edit do

    end
  end

end
