mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
89c87ddbf8
* NEW: Static validation for relationships. * Unit tests added. * PR fixes * PR feedback: Execute validation on flush. * PR fixes. * PR fixes.
37 lines
671 B
PHP
37 lines
671 B
PHP
<?php
|
|
|
|
namespace SilverStripe\Dev\Tests\Validation;
|
|
|
|
use SilverStripe\Dev\TestOnly;
|
|
use SilverStripe\ORM\DataObject;
|
|
|
|
/**
|
|
* Class Freelancer
|
|
*
|
|
* @property string $Title
|
|
* @method Team TemporaryTeam()
|
|
* @method Member TemporaryMember()
|
|
*/
|
|
class Freelancer extends DataObject implements TestOnly
|
|
{
|
|
/**
|
|
* @var string
|
|
*/
|
|
private static $table_name = 'RelationValidationTest_Freelancer';
|
|
|
|
/**
|
|
* @var array
|
|
*/
|
|
private static $db = [
|
|
'Title' => 'Varchar(255)',
|
|
];
|
|
|
|
/**
|
|
* @var array
|
|
*/
|
|
private static $has_one = [
|
|
'TemporaryTeam' => Team::class,
|
|
'TemporaryMember' => Member::class,
|
|
];
|
|
}
|