1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
class Round extends Model
{
// ===========
// = Statics =
// ===========
protected static $table_name = 'MJ_ROUND';
public static function getList()
{
$stm = parent::exec('ROUND_LIST');
return $stm->fetchAll();
}
public static function getRow($id)
{
$stm = parent::exec('ROUND_GET_WITH_ID', ['id' => $id]);
return $stm->fetchAll();
}
public static function getUsersInRound($id)
{
$stm = parent::exec('ROUND_GET_USERS', ['id' => $id]);
return $stm->fetchAll();
}
public static function createRound($array)
{
$begin_date = date('Y-m-d H:i:s');
$pimped_array = array_merge($array, ['begin_date'=>$begin_date]);
$stm = parent::exec('ROUND_CREATE', $pimped_array);
}
public static function updateActions($array)
{
$stm = parent::exec('ACTION_UPDATE', $array);
}
}