2021-06-05 00:30:48 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Garradin\Plugin\Materiels;
|
|
|
|
|
|
|
|
use Garradin\DB;
|
|
|
|
|
2021-06-05 11:04:30 +02:00
|
|
|
class Entry // entrées définitives
|
2021-06-05 00:30:48 +02:00
|
|
|
{
|
|
|
|
protected $columns_order = array(
|
|
|
|
'id',
|
|
|
|
'kind',
|
|
|
|
'number_of_equipments',
|
|
|
|
'equipment_id',
|
|
|
|
'date_of_entry',
|
|
|
|
);
|
|
|
|
|
|
|
|
public function listKinds()
|
|
|
|
{
|
|
|
|
return array(
|
|
|
|
'Achat',
|
|
|
|
'Don',
|
|
|
|
'Récupération',
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2021-06-05 11:04:30 +02:00
|
|
|
public function add($data = [])
|
|
|
|
{
|
|
|
|
DB::getInstance()->insert('plugin_materiels_entry', $data);
|
|
|
|
}
|
2021-06-05 00:30:48 +02:00
|
|
|
}
|