<?php

namespace App\Models;

use App\Models\Crud;
use CodeIgniter\Model;

class Users extends Model
{
    public function SaveUserRecords($records)
    {
        $Crud = new Crud();
        $table = 'public."users"';
        $insert_id = $Crud->AddRecord($table, $records);
        return $insert_id;
    }

    public function SaveUserMeta($DataMeta)
    {
        $Crud = new Crud();
        $table = 'public."user_website"';
        $insert_id = $Crud->AddRecord($table, $DataMeta);
    }

    public function GetAllUsers()
    {
        $Crud = new Crud();
        $SQL = 'SELECT * FROM "public"."users"';
        $FinalArray = $Crud->ExecuteSQL($SQL);
        return $FinalArray;
    }
}
