'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
exports.modSession = exports.modAgent = exports.modEmailVerify = exports.modSwagger = exports.modLogin = exports.modData = exports.Session = exports.Login = exports.Module = exports.DataFields = void 0;
class DataFields {
    field = "";
    value = "";
    type = false;
}
exports.DataFields = DataFields;
class Module {
    path = "";
    table = "";
    fields = [];
    sqlqry = "";
    filter;
    group = "";
    order = "";
    limit = -1;
    type = "";
    session;
    label = "";
    value = "";
    where = false;
    procedure = "";
}
exports.Module = Module;
class Login {
    postfield = [];
    tablefield = [];
    selectfield = [];
    md5 = false;
    table = "";
    filter;
}
exports.Login = Login;
class Session {
    session = "";
    field = [];
    table = "";
    filter;
}
exports.Session = Session;
class modData {
    _status = false;
    data = [
        { procedure: "AddUser", path: "/user", type: "main", fields: ["-1", "-1", "user_name", "password", "type", "first_name", "last_name", "email", "phone", "", "1", "1"] },
    ];
    get status() {
        return this._status;
    }
    Search(path) {
        this._status = false;
        let ret = [];
        this.data.forEach(element => {
            if (element.path == path) {
                ret.push(element);
                this._status = true;
            }
        });
        return ret;
    }
    Type(type, row) {
        this._status = false;
        let ret = new Module();
        row.forEach(element => {
            if (element.type == type) {
                ret = element;
                this._status = true;
            }
        });
        return ret;
    }
}
exports.modData = modData;
class modLogin {
    data = { table: "reseller", postfield: [{ field: "username", type: true }, { field: "password", type: true }], tablefield: ["username", "password"], selectfield: ["iduser", "idaccount", "username", "password", "type", "default", "isEmailVerify", "isMobileVerify", "isPlan", "isAddress"], md5: false, filter: {} };
}
exports.modLogin = modLogin;
class modSwagger {
    data = { table: "api", postfield: [{ field: "username", type: true }, { field: "password", type: true }], tablefield: ["name", "key"], selectfield: ["idapi", "idaccount", "type", "idtariff", "iduser", "path"], md5: false, filter: {} };
}
exports.modSwagger = modSwagger;
class modEmailVerify {
    data = { table: "reseller", postfield: [{ field: "validationKey", type: false }, { field: "isEmailVerify", type: true }, { field: "isMobileVerify", type: true }], tablefield: ["validationKey", "isEmailVerify", "isMobileVerify"], selectfield: ["iduser", "idaccount", "username", "password", "type", "default", "isEmailVerify", "isMobileVerify", "isAddress", "isPlan"], md5: false, filter: {} };
}
exports.modEmailVerify = modEmailVerify;
class modAgent {
    data = { table: "agents", postfield: [{ field: "username", type: true }, { field: "password", type: true }], tablefield: ["username", "password"], selectfield: ["idaccount", 'idagent'], md5: false, filter: {} };
}
exports.modAgent = modAgent;
/**
 * TimeZone enabled in the session
 */
class modSession {
    data = { table: "session", session: "authkey", field: ["iduser", "idaccount", "username", "type", "default", "idtariff", "authkey", "status", "isEmailVerify", "isMobileVerify", "idapi", "isAddress", "isPlan", "tz_diff", "server_time", "client_time", "sessionType"] };
}
exports.modSession = modSession;
