18 lines
612 B
PHP
18 lines
612 B
PHP
|
<?php
|
||
|
|
||
|
class Tournament extends Model
|
||
|
{
|
||
|
protected $dbTable = "tournaments";
|
||
|
protected $dbFields = array(
|
||
|
'registered' => ['type' => 'datetime', 'required', 'unique', 'autoValMethod' => 'getDateTime'],
|
||
|
'name' => ['type' => 'text', 'required'],
|
||
|
'date' => ['type' => 'datetime','required'],
|
||
|
'duration' => ['type' => 'int'], //in days
|
||
|
'referee' => ['type' => 'text'],
|
||
|
'text' => ['type' => 'text'],
|
||
|
'url' => ['type' => 'text'], //if there is one
|
||
|
'logo' => ['type' => 'text', 'default' => 'https://pictshare.net/prrnrk.jpg']
|
||
|
);
|
||
|
|
||
|
}
|