mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
34 lines
696 B
PHP
34 lines
696 B
PHP
<?php
|
|
|
|
namespace SilverStripe\ORM\Tests\DataObjectTest;
|
|
|
|
use SilverStripe\Dev\TestOnly;
|
|
use SilverStripe\ORM\DataObject;
|
|
|
|
/**
|
|
* @property string $Title
|
|
* @method Bracket Parent()
|
|
* @method Team First()
|
|
* @method Team Second()
|
|
* @method Team Winner()
|
|
*/
|
|
class Bracket extends DataObject implements TestOnly
|
|
{
|
|
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,
|
|
];
|
|
}
|