2017-11-29 03:20:09 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace SilverStripe\RestfulServer\Tests\Stubs;
|
|
|
|
|
|
|
|
use SilverStripe\Dev\TestOnly;
|
2018-02-08 04:56:21 +01:00
|
|
|
use SilverStripe\ORM\DataObject;
|
2017-11-29 03:20:09 +01:00
|
|
|
|
|
|
|
class RestfulServerTestPage extends DataObject implements TestOnly
|
|
|
|
{
|
|
|
|
private static $api_access = false;
|
|
|
|
|
|
|
|
private static $table_name = 'RestfulServerTestPage';
|
|
|
|
|
|
|
|
private static $db = array(
|
|
|
|
'Title' => 'Text',
|
|
|
|
'Content' => 'HTMLText',
|
|
|
|
);
|
|
|
|
|
|
|
|
private static $has_one = array(
|
|
|
|
'Author' => RestfulServerTestAuthor::class,
|
|
|
|
);
|
|
|
|
|
|
|
|
private static $has_many = array(
|
|
|
|
'TestComments' => RestfulServerTestComment::class
|
|
|
|
);
|
|
|
|
|
|
|
|
private static $belongs_many_many = array(
|
|
|
|
'RelatedAuthors' => RestfulServerTestAuthor::class,
|
|
|
|
);
|
|
|
|
}
|