new: [Tag collections] Added boilerplate models

pull/3989/head
iglocska 2018-12-14 20:25:38 +01:00
parent 10557c12da
commit ecf52d5cb8
2 changed files with 58 additions and 0 deletions

View File

@ -0,0 +1,33 @@
<?php
App::uses('AppModel', 'Model');
class TagCollection extends AppModel
{
public $useTable = 'tag_collections';
public $displayField = 'name';
public $actsAs = array(
'Trim',
'SysLogLogable.SysLogLogable' => array(
'roleModel' => 'Role',
'roleKey' => 'role_id',
'change' => 'full'
)
);
public $whitelistedItems = false;
public $validate = array(
'name' => array(
'valueNotEmpty' => array(
'rule' => array('valueNotEmpty'),
),
'unique' => array(
'rule' => 'isUnique',
'message' => 'A similar name already exists.',
),
)
);
}

View File

@ -0,0 +1,25 @@
<?php
App::uses('AppModel', 'Model');
class TagCollectionElement extends AppModel
{
public $useTable = 'tag_collection_elements';
public $displayField = 'name';
public $actsAs = array(
'Trim',
'SysLogLogable.SysLogLogable' => array(
'roleModel' => 'Role',
'roleKey' => 'role_id',
'change' => 'full'
)
);
public $whitelistedItems = false;
public $validate = array(
);
}