<?php

namespace Core\Librerias;

use Core\Database;

final class ModuleAction
{
    private $db_cone;

    public function __construct()
    {
        $this->db_cone = new Database();
    }

    public function getModuleActionName($module_id, $action_id)
    {
        return $this->db_cone->consultar("SELECT * FROM app_modules_actions WHERE action_id='{$action_id}' AND module_id='{$module_id}'")->all();
    }

    public function getModuleActions($module_id)
    {
        return $this->db_cone->consultar("SELECT * FROM app_modules_actions WHERE module_id='{$module_id}' ORDER BY sort")->all();
    }
}
