1 | <?php |
||
2 | |||
3 | namespace Gurucomkz\EagerLoading\Tests\Models; |
||
4 | |||
5 | use Gurucomkz\EagerLoading\EagerLoaderMultiAccessor; |
||
6 | use SilverStripe\Dev\TestOnly; |
||
7 | use SilverStripe\ORM\DataObject; |
||
8 | |||
9 | class Player extends DataObject implements TestOnly |
||
10 | { |
||
11 | use EagerLoaderMultiAccessor; |
||
12 | |||
13 | private static $table_name = 'TestPlayer'; |
||
14 | private static $db = [ |
||
15 | 'Title' => 'Varchar' |
||
16 | ]; |
||
17 | |||
18 | private static $many_many = [ |
||
19 | 'Listens' => Music::class, |
||
20 | ]; |
||
21 | |||
22 | private static $has_one = [ |
||
23 | 'Team' => Team::class, |
||
24 | 'Origin' => Origin::class, |
||
25 | 'Drink' => Drink::class, |
||
26 | ]; |
||
27 | |||
28 | private static $export_fields = [ |
||
0 ignored issues
–
show
introduced
by
![]() |
|||
29 | 'ID' => 'ID', |
||
30 | 'Title' => 'Title', |
||
31 | 'Team.Title' => 'Team', |
||
32 | 'Origin.Title' => 'Origin', |
||
33 | ]; |
||
34 | |||
35 | private static $eager_loading = [ |
||
0 ignored issues
–
show
|
|||
36 | 'Listens', |
||
37 | 'Origin', |
||
38 | ]; |
||
39 | } |
||
40 |