class ExpressCompany < ActiveRecord::Base
    has_paper_trail
    self.table_name = 'express_companys'
    validates :express_code,:express_company,presence:true

    rails_admin do
        navigation_label '仓储物流管理'
        weight -300
        #parent Order
        nestable_tree({
            position_field: :position,
            max_depth: 2
        })

        list do 
            filters [:express_code,:express_company]
            field :id
            field :express_code
            field :express_company
        end

        show do
            field :id
            field :express_code
            field :express_company
        end

        edit do
            field :id
            field :express_code
            field :express_company
        end
    end

end