import request from '@/utils/request';

/*
 * 分页查询
 */
export const getTdLocType = (params) => request('/api/tdLocType', { params });

/*
 * 新增数据
 */
export const postTdLocType = (data) => request('/api/tdLocType', { data, method: 'post' });

/*
 * 通过ID查询单条数据
 */
export const getTdLocTypeById = (id) => request(`/api/tdLocType/${id}`);

/**
 * 更新数据
 * @param {*} id
 * @param {*} data
 * @returns
 */
export const putTdLocType = (id, data) => request(`/api/tdLocType/${id}`, { data, method: 'put' });

/*
 * 通过主键删除数据
 */
export const deleteTdLocType = (id) => request(`/api/tdLocType/${id}`, { method: 'delete' });
