<?php

namespace App\Models;

use CodeIgniter\Model;

class PersonnelModel extends Model
 {
    protected $table            = 'personnel';
    protected $primaryKey       = 'id';
    protected $allowedFields    = ['nom', 'prenom', 'telephone','matricule','sexe','code_str'];
    protected $useTimestamps    = true; // Active les champs created_at et updated_at

    public function countAllPersonnel()
   {
      return $this->db->table('personnel')->countAllResults();
   }

    
 }