var system = require("../../../system")
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
var cacheBaseComp = null;

class FormItemCtl extends CtlBase {
    constructor() {
        super("configmag", CtlBase.getServiceName(FormItemCtl));
    }
    async getFormItemListByFormId(pobj){
        return this.service.getFormItemListByFormId(pobj);
    }
    /**
     * 重写添加方法
     * @param pobj
     * @returns {Promise<void>}
     */
    async create(pobj){
        let result = this.service.createItem(pobj);
        return result;
    }

    /**
     * 重写修改方法
     * @param pobj
     * @returns {Promise<void>}
     */
    async update(pobj){
        let result = this.service.updateItem(pobj);
        return result;
    }

    /**
     * 删除
     * @param pobj
     * @returns {Promise<*>}
     */
    async delete(pobj){
        let result = this.service.deleteItem(pobj);
        return result;
    }
}

module.exports = FormItemCtl;
