class MOdrPlace < ApplicationRecord
  belongs_to :m_odr

  acts_as_sorting :fields => {
    :id => {:name => "Id", :reorder => true},
    :enseigne => {:name => "Enseigne", :reorder => true},
    :name => {:name => "Nom", :reorder => true},
    :address2 => {:name => "Adresse", :reorder => true},
    :cp => {:name => "Code postal", :reorder => true},
    :city => {:name => "Ville", :reorder => true},
    :actions => {:name => "Actions", :reorder => true},

  }

  acts_as_csv_import :fields => [:name, :enseigne, :email, :tel, :address2, :address3, :cp, :city, :country]
  

  def member_label
    self.enseigne.to_s+" - "+self.name.to_s+" - "+self.city.to_s
  end


end
