/**
 * @desc 新增
 */

import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios'

export class Params {
    /** id */
    id: string
    /** 字典 ID */
    dictId: string
    /** 字典选项名称 */
    name: string
    /** 字典选项值 */
    value: string
    /** 字典选项描述 */
    description?: string
    /** 字典选项排序序号 */
    serial?: number
    /** 字典选项是否启用 */
    enable: boolean
}

export const init = new defs.ResultString()

export function request(params: Params, config?: http.RequestConfig<Params>, options?: http.RequestOptions) {
    return defHttp.request(
        {
            url: '/sys/dict/item/add',
            method: 'POST',
            data: params,

            ...config,
        },
        {
            ...options,
        },
    )
}
