import { baseRequest } from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/api/webapp/disk/major/` + url, ...arg)

/**
 * majorApi接口管理器
 *
 * @author pans
 * @date  2025/06/26 10:41
 **/
export default {
	// 获取major分页
	majorPage(data) {
		return request('page', data, 'get')
	},
	// 提交major表单 edit为true时为编辑，默认为新增
	majorSubmitForm(data, edit = false) {
		return request(edit ? 'edit' : 'add', data)
	},
	// 删除major
	majorDelete(data) {
		return request('delete', data)
	},
	// 获取major详情
	majorDetail(data) {
		return request('detail', data, 'get')
	}}
