<?php

namespace App\Libraries\Log;

use \App\Models\LoggerModel;

class DataBase
{
  private $_model = null;
  public function __construct()
  {
    $this->_model = new LoggerModel();
  }
  public function save(string $title, bool $status, array $logs)
  {
    $datas = array(
      'title' => $title,
      'status' => $status ? 'use' : 'unuse',
      'content' => implode("\n", $logs)
    );
    return $this->_model->create($datas);
  }
}
