import { GET, POST, Delete } from "@/utils/request";

const GetModel = () => {
  return GET("/vehicle/getModel");
};

const GetVehicleList = (params) => {
  return POST("/vehicle/getVehicleList", {}, true, params);
};

const PostcreateGroup = (data) => {
  return POST("/group/createGroup", data, true);
};

const PostaddTicket = (data) => {
  return POST("/issueTicket/addTicket/" + data.ticketName, data, true);
};

const GetTickets = (params) => {
  return GET("/issueTicket/getTickets", params);
};

const GetTicketDetial = (params) => {
  return GET(`/issueTicket/getTicket/${params.ticketNo}`, params);
};

const DeleteTickets = (params) => {
  return Delete("/issueTicket/delTicket", params);
};

const GetGroups = (params) => {
  return GET("/group/getGroups", params);
};

const DeleteGroup = (params) => {
  return Delete(`/group/deleteGroup/${params.groupId}`, params);
};

const GetGroupsDetail = (params) => {
  return GET(`/group/getGroup/${params.groupId}`, params);
};


export {
  GetModel,
  GetVehicleList,
  PostcreateGroup,
  PostaddTicket,
  GetTickets,
  GetTicketDetial,
  DeleteTickets,
  GetGroups,
  DeleteGroup,
  GetGroupsDetail
};
