eintragung geht 🎉
All checks were successful
Build and push / Pulling repo on server (push) Successful in 3s
All checks were successful
Build and push / Pulling repo on server (push) Successful in 3s
This commit is contained in:
@ -7,6 +7,7 @@ class Result extends Model
|
||||
'tournament' => ['type' => 'text', 'required'], //tournament ID
|
||||
'run' => ['type' => 'text', 'required'], //run ID
|
||||
'user' => ['type' => 'text', 'required'], //user ID
|
||||
'dog' => ['type' => 'text', 'required'], //dog ID
|
||||
|
||||
'disqualified' => ['type' => 'bool','default'=>0],
|
||||
'refusals' => ['type' => 'int','default'=>0],
|
||||
@ -22,7 +23,31 @@ class Result extends Model
|
||||
'videos' => ['type' => 'array','default'=>[]],
|
||||
'memo' => ['type' => 'text'],
|
||||
'public' => ['type' => 'bool','default'=>1],
|
||||
|
||||
);
|
||||
|
||||
function getDataOfRun($rid)
|
||||
{
|
||||
$run = new Run();
|
||||
if($run->exists($rid))
|
||||
$run->load($rid);
|
||||
else return false;
|
||||
|
||||
$results = $run->data['results'];
|
||||
if(is_array($results) && count($results)>0)
|
||||
{
|
||||
$res = [];
|
||||
foreach($results as $r)
|
||||
{
|
||||
$result = new Result();
|
||||
if($result->exists($r))
|
||||
{
|
||||
$result->load($r);
|
||||
$res[] = $result->data;
|
||||
}
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
else return [];
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user