mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-11-30 04:04:03 -05:00
47 lines
717 B
PHP
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',
|
|
),
|
|
),
|
|
);
|
|
|
|
}
|