import request from '../../axios'

export interface IFlowPage {
    current: number
    size: number
}

export const list = (data: IFlowPage) => {
    return request.post({url: '/api/camunda/model/query', data})
}

export interface IFlowRow {
    id?: number
    jsonXml?: string
    deployId?: string
    deployIds?: string[]
    ids?: number[]
    version?: number
}

export const update = (data: IFlowRow) => {
    return request.post({url: '/api/camunda/model/update', data})
}

export const create = (data: IFlowRow) => {
    return request.post({url: '/api/camunda/model/create', data})
}
export const del = (id: number) => {
    return request.get({url: `/api/camunda/model/deleteById?id=${id}`})
}
export const deleteMult = (data: IFlowRow) => {
    return request.post({url: '/api/camunda/model/deleteByIds', data})
}
export const deployment = (id: number) => {
    return request.get({url: `/api/camunda/model/deployment?id=${id}`})
}
export const find = (id: number) => {
    return request.get({url: `/api/camunda/model/findById?id=${id}`})
}
