123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- // Copyright 2019 Hackware SpA <human@hackware.cl>
- // "Hackware Web Services Core" is released under the MIT License terms.
- namespace Hawese\Tests;
- use Hawese\Core\TableModel;
- class DumbTableModel extends TableModel
- {
- public static $table = 'dumbs';
- public static $attributes = [
- 'id' => [],
- 'attr1' => ['nullable', 'string'], // used in testValidate()
- 'attr2' => [],
- 'custom_getter' => [],
- 'custom_setter' => [],
- 'created_at' => [],
- 'updated_at' => [],
- 'deleted_at' => [],
- 'else_at' => [],
- 'foreign_id' => [],
- 'other_foreign_id' => [],
- ];
- public static $foreign_keys = [
- 'foreign_id' => ForeignTableModel::class,
- 'other_foreign_id' => ForeignTableModel::class,
- ];
- protected function getCustomGetter()
- {
- return 'custom_getter_value';
- }
- protected function setCustomSetter($newValue)
- {
- $this->custom_setter = 'custom_setter_value';
- }
- }
|