Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- App::uses('AppModel', 'Model');
- /**
- * TicketResponse Model
- *
- * @property Ticket $Ticket
- */
- class TicketResponse extends AppModel {
- /**
- * Display field
- *
- * @var string
- */
- public $displayField = 'id';
- /**
- * Validation rules
- *
- * @var array
- */
- public $validate = array(
- 'ticket_id' => array(
- 'numeric' => array(
- 'rule' => array('numeric'),
- //'message' => 'Your custom message here',
- //'allowEmpty' => false,
- //'required' => false,
- //'last' => false, // Stop validation after this rule
- //'on' => 'create', // Limit validation to 'create' or 'update' operations
- ),
- ),
- 'content' => array(
- 'notEmpty' => array(
- 'rule' => array('notEmpty'),
- //'message' => 'Your custom message here',
- //'allowEmpty' => false,
- //'required' => false,
- //'last' => false, // Stop validation after this rule
- //'on' => 'create', // Limit validation to 'create' or 'update' operations
- ),
- ),
- 'email' => array(
- 'email' => array(
- 'rule' => array('email'),
- //'message' => 'Your custom message here',
- //'allowEmpty' => false,
- //'required' => false,
- //'last' => false, // Stop validation after this rule
- //'on' => 'create', // Limit validation to 'create' or 'update' operations
- ),
- ),
- 'assignee_response' => array(
- 'boolean' => array(
- 'rule' => array('boolean'),
- //'message' => 'Your custom message here',
- //'allowEmpty' => false,
- //'required' => false,
- //'last' => false, // Stop validation after this rule
- //'on' => 'create', // Limit validation to 'create' or 'update' operations
- ),
- ),
- );
- //The Associations below have been created with all possible keys, those that are not needed can be removed
- /**
- * belongsTo associations
- *
- * @var array
- */
- public $belongsTo = array(
- 'Ticket' => array(
- 'className' => 'Ticket',
- 'foreignKey' => 'ticket_id',
- 'conditions' => '',
- 'fields' => '',
- 'order' => ''
- )
- );
- /**
- * hasMany associations
- *
- * @var array
- */
- public $hasMany = array(
- 'TicketAttachment' => array(
- 'className' => 'TicketAttachment',
- 'foreignKey' => 'ticket_response_id',
- 'dependent' => false,
- 'conditions' => '',
- 'fields' => '',
- 'order' => '',
- 'limit' => '',
- 'offset' => '',
- 'exclusive' => '',
- 'finderQuery' => '',
- 'counterQuery' => ''
- )
- );
- }
Advertisement
Add Comment
Please, Sign In to add comment