module Mobile
  module Entities
    class CourseGroup < Grape::Entity
      include Redmine::I18n
      include ApplicationHelper
      include ApiHelper
      def self.course_group_expose(f)
        expose f do |u,opt|
          if u.is_a?(Hash) && u.key?(f)
            u[f]
          end
        end
      end
      expose :id
      expose :name
      expose :users, using: Mobile::Entities::User
    end
  end
end
