# coding:utf-8
module API
  module Entity
    class App < Grape::Entity
      expose :imei
    end
    class DeliveryArea < Grape::Entity
      expose :area
    end

    class Station < Grape::Entity
      expose :zipcode
      expose :contact
      expose :mobile
      expose :imei
      #extra imei
      expose :extram_imei do |model, option|
        apps = model.secondary_apps
        Entity::App.represent(apps)
      end

      expose :province
      expose :city
      expose :district
      expose :address
      #delivery area
      expose :delivery_areas, using: Entity::DeliveryArea

      expose :longitude
      expose :latitude
    end

  end
end
