Mapper = require("../Mapper.js").mapper

class ActivityStatusMapper extends Mapper

  constructor: ->
    @identifier = "activitystatus"

  schema: (method, action, endpoint, fun, args) ->
    switch fun.toLowerCase()
      when "listbyorgandtype"
        @map(["Organization.Id"], args) # one argument, organization id
      when "tabsviewbyorg"
        @map(["Organization.Id"], args)

  applySchema: (method, action, endpoint, fun, schema) ->
    switch fun.toLowerCase()
      when "listbyorgandtype", "tabsviewbyorg"
        @unmap(schema)
      else
        winston.warn "no such fun", fun

exports.mapper = new ActivityStatusMapper()