class ProductAttrKey < ActiveRecord::Base
    has_paper_trail
    self.table_name = 'product_attr_keys'
    validates :name,presence:true
    
    rails_admin do
        navigation_label '商品管理'
        weight -250
        nestable_tree({
            position_field: :position,
            max_depth: 2
        })

        list do 
            filters [:name,:status]
            field :id
            field :name
            field :status
        end

        show do
            field :id
            field :name
            field :status
        end

        edit do 
            field :name 
            field :status
        end 

    end

end