import request from '@/utils/request';

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

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

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

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

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