# encoding: utf-8
class PayConfig < ActiveRecord::Base
  has_paper_trail
  self.table_name = "pay_configs"
  belongs_to :depart_record, :foreign_key => :depart

  rails_admin do
    navigation_label '系统参数配置'
    weight -500
    PAY_ENUM= [["乐福优选","lehu"], ["玖玖好购","fohow"], ["凤凰欧标","oubiao"], ["丰和","fenghe"]]

    #parent WxUser
    list do
      filters [:depart,:remark]
      field :id
      field :depart do
        filterable true
      end
      field :depart_record
      field :pay_code, :enum do
        filterable true
        enum do
          PAY_ENUM
        end
      end
      field :remark
      field :created_at
      field :updated_at
    end

    show do
      field :id
      field :depart do
        filterable true
      end
      field :depart_record
      field :pay_code, :enum do
        filterable true
        enum do
          PAY_ENUM
        end
      end
      field :remark
      field :created_at
      field :updated_at
    end

    edit do
      field :depart
      field :pay_code, :enum do
        filterable true
        enum do
          PAY_ENUM
        end
      end
      field :remark
    end
  end
end
