This repository has been archived on 2023-12-29. You can view files and clone it, but cannot push or open issues or pull requests.
dogstats/web/models/Result.model.php

29 lines
1.1 KiB
PHP
Raw Normal View History

<?php
class Result extends Model
{
protected $dbTable = "result";
protected $dbFields = array(
'tournament' => ['type' => 'text', 'required'], //tournament ID
'run' => ['type' => 'text', 'required'], //run ID
'user' => ['type' => 'text', 'required'], //user ID
2023-10-31 12:49:20 +01:00
'disqualified' => ['type' => 'bool','default'=>0],
'refusals' => ['type' => 'int','default'=>0],
'errors' => ['type' => 'int','default'=>0],
'timefaults' => ['type' => 'int','default'=>0],
'runtime' => ['type' => 'int','default'=>0],
'penalties' => ['type' => 'int','default'=>0],
'rating' => ['type' => 'text'],
'points' => ['type' => 'int','default'=>0],
'speed' => ['type' => 'int','default'=>0], //in m/sec
'ranking' => ['type' => 'int','default'=>0],
'photos' => ['type' => 'array','default'=>[]],
'videos' => ['type' => 'array','default'=>[]],
'memo' => ['type' => 'text'],
2023-10-31 12:49:20 +01:00
'public' => ['type' => 'bool','default'=>1],
);
}