var APIBase = require("../../api.base");
var system = require("../../../system");
class SaasAPI extends APIBase {
    constructor() {
        super();
        this.orderSve = system.getObject("service.order.orderSve");
        this.businessscopeSve = system.getObject("service.common.businessscopeSve");
        this.saasbusinessSve = system.getObject("service.saas.saasbusinessSve");
        this.restClient = system.getObject("util.restClient");
    }
    async openSaas(pobj, query, req) {
        let rs = await this.saasbusinessSve.openSaasBusiness(pobj);
        if (rs.status === 0 && rs.data && rs.data.id) {
            // 创建默认
            await this.businessscopeSve.setDefaultBusinessScope({saas_id: rs.data.id});
        }
        return rs;
    }

    exam() {
        return "";
    }
    classDesc() {
        return {
            groupName: "",
            groupDesc: "",
            name: "",
            desc: "",
            exam: "",
        };
    }
    methodDescs() {
        return [
            {
                methodDesc: "",
                methodName: "",
                paramdescs: [
                    {
                        paramDesc: "",
                        paramName: "",
                        paramType: "",
                        defaultValue: "",
                    }
                ],
                rtnTypeDesc: "",
                rtnType: ""
            }
        ];
    }
}
module.exports = SaasAPI;