mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
44 lines
785 B
PHP
44 lines
785 B
PHP
|
<?php
|
||
|
|
||
|
namespace SilverStripe\Dev\Tests\Validation;
|
||
|
|
||
|
use SilverStripe\Dev\TestOnly;
|
||
|
use SilverStripe\ORM\DataObject;
|
||
|
use SilverStripe\ORM\ManyManyList;
|
||
|
|
||
|
/**
|
||
|
* Class Hat
|
||
|
*
|
||
|
* @property string $Title
|
||
|
* @method Member Hatter()
|
||
|
* @method ManyManyList|Team[] TeamHats()
|
||
|
*/
|
||
|
class Hat extends DataObject implements TestOnly
|
||
|
{
|
||
|
/**
|
||
|
* @var string
|
||
|
*/
|
||
|
private static $table_name = 'RelationValidationTest_Hat';
|
||
|
|
||
|
/**
|
||
|
* @var array
|
||
|
*/
|
||
|
private static $db = [
|
||
|
'Title' => 'Varchar(255)',
|
||
|
];
|
||
|
|
||
|
/**
|
||
|
* @var array
|
||
|
*/
|
||
|
private static $belongs_to = [
|
||
|
'Hatter' => Member::class . '.Hat',
|
||
|
];
|
||
|
|
||
|
/**
|
||
|
* @var array
|
||
|
*/
|
||
|
private static $belongs_many_many = [
|
||
|
'TeamHats' => Team::class . '.ReserveHats',
|
||
|
];
|
||
|
}
|