<?php
App::uses('AppModel', 'Model');
/**
* ApplicantComment Model
*
* @property Applicant $Applicant
*/
class ApplicantComment extends AppModel {
/**
* Display field
*
* @var string
*/
public $displayField = 'applicant_id';
public $order = "ApplicantComment.created DESC";
/**
* Validation rules
*
* @var array
*/
public $validate = array(
'comment' => array(
'notBlank' => array(
'rule' => array('notBlank'),
//'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(
'Applicant' => array(
'className' => 'Applicant',
'foreignKey' => 'applicant_id',
'conditions' => '',
'fields' => '',
'order' => ''
)
);
}