module.exports = Self => {
    Self.remoteMethod('getSectors', {
        description: 'Get all sectors',
        accessType: 'READ',
        returns: {
            type: 'Object',
            root: true
        },
        http: {
            path: `/getSectors`,
            verb: 'GET'
        }
    });

    Self.getSectors = async() => {
        const query = `CALL vn.sector_get()`;
        const [result] = await Self.rawSql(query);
        return result;
    };
};