import request from '@/config/axios'

// 门墩儿-企业地址 VO
export interface EnterpriseAddressVO {
  id: number // id
  enterpriseId: number // 企业id
  address: string // 公司地址
  longitude: string // 经度
  latitude: string // 维度
}

// 门墩儿-企业地址 API
export const EnterpriseAddressApi = {
  // 查询门墩儿-企业地址分页
  getEnterpriseAddressPage: async (params: any) => {
    return await request.get({ url: `/menduner/system/enterprise-address/page`, params })
  },

  // 查询门墩儿-企业地址详情
  getEnterpriseAddress: async (id: number) => {
    return await request.get({ url: `/menduner/system/enterprise-address/get?id=` + id })
  },

  // 新增门墩儿-企业地址
  createEnterpriseAddress: async (data: EnterpriseAddressVO) => {
    return await request.post({ url: `/menduner/system/enterprise-address/create`, data })
  },

  // 修改门墩儿-企业地址
  updateEnterpriseAddress: async (data: EnterpriseAddressVO) => {
    return await request.put({ url: `/menduner/system/enterprise-address/update`, data })
  },

  // 删除门墩儿-企业地址
  deleteEnterpriseAddress: async (id: number) => {
    return await request.delete({ url: `/menduner/system/enterprise-address/delete?id=` + id })
  },

  // 导出门墩儿-企业地址 Excel
  exportEnterpriseAddress: async (params) => {
    return await request.download({ url: `/menduner/system/enterprise-address/export-excel`, params })
  }
}