Files
zoneminder/web/api/app/Model/ZonePreset.php
T

47 lines
717 B
PHP

<?php
App::uses('AppModel', 'Model');
/**
* ZonePreset Model
*
*/
class ZonePreset extends AppModel {
/**
* Use table
*
* @var mixed False or table name
*/
public $useTable = 'ZonePresets';
/**
* Primary key field
*
* @var string
*/
public $primaryKey = 'Id';
/**
* Display field
*
* @var string
*/
public $displayField = 'Name';
/**
* Validation rules. The column defaults to the empty string, so without this a preset could be
* added with no name or have its name blanked.
*
* @var array
*/
public $validate = array(
'Name' => array(
'notBlank' => array(
'rule' => array('notBlank'),
'required' => 'create',
'message' => 'A zone preset needs a name',
),
),
);
}