import api from '../index'

export default {
  page: (data: {
    keyword?: string
    building?: string
    city?: string
    page?: number
    size?: number
  }) => api.post('magic-api/base/location/page', data),

  list: () => api.get('magic-api/base/location/list'),

  detail: (id: number) => api.get('magic-api/base/location/detail', { params: { id } }),

  save: (data: any) => api.post('magic-api/base/location/save', data),

  delete: (id: number) => api.post('magic-api/base/location/delete', { id }),
}
