silverstripe-framework/tests/php/Dev/Validation/Freelancer.php
Mojmir Fendek 89c87ddbf8
NEW: Static validation for relationships. (#9874)
* NEW: Static validation for relationships.

* Unit tests added.

* PR fixes

* PR feedback: Execute validation on flush.

* PR fixes.

* PR fixes.
2022-02-04 14:41:09 +13:00

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,
];
}