2017-05-19 04:07:45 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace SilverStripe\ORM\Tests\DataObjectTest;
|
|
|
|
|
2017-05-30 23:31:56 +02:00
|
|
|
use SilverStripe\Dev\TestOnly;
|
2017-05-19 04:07:45 +02:00
|
|
|
use SilverStripe\ORM\DataObject;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @property string $Title
|
|
|
|
* @method Bracket Parent()
|
|
|
|
* @method Team First()
|
|
|
|
* @method Team Second()
|
|
|
|
* @method Team Winner()
|
|
|
|
*/
|
2017-05-30 23:31:56 +02:00
|
|
|
class Bracket extends DataObject implements TestOnly
|
2017-05-19 04:07:45 +02:00
|
|
|
{
|
|
|
|
private static $table_name = 'DataObjectTest_Bracket';
|
|
|
|
|
|
|
|
private static $db = [
|
|
|
|
'Title' => 'Varchar(100)',
|
|
|
|
];
|
|
|
|
|
|
|
|
private static $has_one = [
|
|
|
|
'Next' => Bracket::class,
|
|
|
|
'First' => Team::class,
|
|
|
|
'Second' => Team::class,
|
|
|
|
'Winner' => Team::class,
|
|
|
|
];
|
|
|
|
|
|
|
|
private static $has_many = [
|
|
|
|
'Previous' => Bracket::class,
|
|
|
|
];
|
|
|
|
}
|