<?php

/**
 * Created by PhpStorm.
 * User: Claudio
 * Date: 31/03/2020
 * Time: 11:28
 */
class PontoRestService extends \Adianti\Service\AdiantiRecordService
{
    const DATABASE      = 'jackpot';
    const ACTIVE_RECORD = 'Ponto';

    public static function getAll( $request )
    {
        TTransaction::open('jackjpot');
        $response = array();

        // carrega os contatos
        $all = Ponto::where('usuario', '=', $request['usuario'])->load();
        foreach ($all as $product)
        {
            $response[] = $product->toArray();
        }
        TTransaction::close();
        return $response;
    }

}
?>

