class RadioManagement < ActiveRecord::Base
  include PublicActivity::Model

  belongs_to :radio_profile

  tracked owner: ->(controller, model) { controller && controller.tracked_current_user },params:
  { :attributes => proc {|controller, model_instance| {"radio_management(#{model_instance.id})" => model_instance.changes}}},organisation_id: ->(controller, model) { controller && controller.tracked_current_user.organisation_id },location_network_id: proc {|controller, model_instance| model_instance.radio_profile.location_network_id}

  tracked assumed_by: proc {|controller, model| controller.user_assumed_by if controller}

  def json_build
  	{:id => self.id, :client_steering => self.client_steering, :assoc_steering => self.assoc_steering, :auto_channel_balancing => self.auto_channel_balancing, :required_probe_snr => self.required_probe_snr, :required_roam_snr => self.required_roam_snr, :load_kick_threshold => self.load_kick_threshold, :radio_profile_id => self.radio_profile_id}
  end
end