<?php
/**
 * Author: lopiu
 * Date: 04.07.2020
 * Time: 13:17
 */
namespace Battles\Models;

use Battles\Database\Db;

class PresentsModel
{
    protected $DB;

    public function __construct(int $user_id)
    {
        if (!$this->DB) {
            $this->DB = Db::getInstance()->execute('SELECT sender_id, image FROM `users_presents` WHERE owner_id = ?', $user_id);
        }
    }

    public function getAllPresents()
    {
        return $this->DB;
    }
}