2016-10-14 03:30:05 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace SilverStripe\ORM\Tests\DataObjectTest;
|
|
|
|
|
|
|
|
use SilverStripe\Dev\TestOnly;
|
|
|
|
use SilverStripe\ORM\DataObject;
|
|
|
|
|
|
|
|
class Staff extends DataObject implements TestOnly
|
|
|
|
{
|
2020-04-20 19:58:09 +02:00
|
|
|
private static $db = [
|
2016-12-16 05:34:21 +01:00
|
|
|
'Salary' => 'BigInt',
|
2018-11-05 04:09:49 +01:00
|
|
|
'EmploymentType' => 'Varchar',
|
2020-04-20 19:58:09 +02:00
|
|
|
];
|
2016-10-14 03:30:05 +02:00
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
private static $table_name = 'DataObjectTest_Staff';
|
2016-10-14 03:30:05 +02:00
|
|
|
|
2020-04-20 19:58:09 +02:00
|
|
|
private static $has_one = [
|
2016-12-16 05:34:21 +01:00
|
|
|
'CurrentCompany' => Company::class,
|
|
|
|
'PreviousCompany' => Company::class
|
2020-04-20 19:58:09 +02:00
|
|
|
];
|
2018-11-05 04:09:49 +01:00
|
|
|
|
|
|
|
private static $defaults = [
|
|
|
|
'EmploymentType' => 'Staff',
|
|
|
|
];
|
2016-10-14 03:30:05 +02:00
|
|
|
}
|