import api from '@/core/api/axios';

const BASE = '/api/wtm/projects';

export const projectService = {
  getAll: (params?: Record<string, unknown>) => api.get(BASE, { params }),
  getById: (id: number) => api.get(`${BASE}/${id}`),
  create: (data: unknown) => api.post(BASE, data),
  update: (id: number, data: unknown) => api.put(`${BASE}/${id}`, data),
  getMy: () => api.get(`${BASE}/my`),
  getMembers: (id: number) => api.get(`${BASE}/${id}/members`),
  getAssignments: (id: number) => api.get(`${BASE}/${id}/assignments`),
};
