28 lines
No EOL
727 B
PHP
28 lines
No EOL
727 B
PHP
<?php
|
|
|
|
namespace App\Model\Table;
|
|
|
|
use Cake\ORM\Table;
|
|
|
|
class InputsTable extends Table {
|
|
public function initialize(array $config) {
|
|
parent::initialize($config);
|
|
|
|
$this->setPrimaryKey('Id');
|
|
$this->setTable('Inputs');
|
|
|
|
$this->addBehavior('SimpleAudit');
|
|
|
|
$this->addAssociations([
|
|
'belongsToMany' => [
|
|
'InputAddresses' => [
|
|
'className' => 'App\Model\Table\AddressesTable',
|
|
'joinTable' => 'InputsAddresses',
|
|
'foreignKey' => 'InputId',
|
|
'targetForeignKey' => 'AddressId',
|
|
'propertyName' => 'InputAddresses'
|
|
]
|
|
]
|
|
]);
|
|
}
|
|
} |