import type * as T from '@/apis/team/type'
import http from '@/utils/http'

const BASE_URL = '/team/config'

export function listTeam(query: T.TeamPageQuery) {
  return http.get<PageRes<T.TeamListResp[]>>(`${BASE_URL}/page`, query)
}
export function teamById(id: number) {
  return http.get<T.TeamListResp[]>(`${BASE_URL}/${id}`)
}
export function teamPost(data: T.TeamData) {
  return http.post<any>(`${BASE_URL}`, data)
}

export function teamUpdata(id: number, data: T.TeamData) {
  return http.put<any>(`${BASE_URL}/${id}`, data)
}
export function teamDel(id: number) {
  return http.del<any>(`${BASE_URL}/${id}`)
}
