/*
 * @Author: zc
 * @description 线路管理
 * @version: 
 * @Date: 2022-08-26 14:43:12
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2022-11-15 14:17:01
 */
import request from '/@/utils/request';

/**
 * @description 获取线路列表
 * @param {object} params
 * @return {*}
 */
export const getList = (params?: object) => {
	return request({
		url: '/api/v1/Pbx/trunk-list',
		method: 'get',
		params: params,
	});
};
/**
 * @description 获取线路对象
 * @param {string} id
 * @return {*}
 */
export const getLineDetail = (id: string) => {
	return request({
		url: `/api/v1/Pbx/trunk/${id}`,
		method: 'get',
	});
};
/**
 * @description 新增线路
 * @param {object} data
 * @return {*}
 */
export const addLine = (data: object) => {
	return request({
		url: '/api/v1/Pbx/addtrunk',
		method: 'post',
		data,
	});
};
/**
 * @description 修改线路
 * @param {object} data
 * @return {*}
 */
export const updateLine = (data: object) => {
	return request({
		url: '/api/v1/Pbx/updatetrunk',
		method: 'post',
		data,
	});
};
/**
 * @description 新增线路
 * @param {string} id
 * @return {*}
 */
export const removeLine = (id: string) => {
	return request({
		url: `/api/v1/Pbx/removetrunk/${id}`,
		method: 'get',
	});
};
/**
 * @description 线路页面基础信息
 * @return {*}
 */
export const baseInfo = () => {
	return request({
		url: `/api/v1/Pbx/trunk-page-info`,
		method: 'get',
	});
};