<?php
App::uses('AppModel', 'Model');
/**
* ApplicantComment Model
*
* @property Applicant $Applicant
*/
class ApplicantDocument extends AppModel {
/**
* Display field
*
* @var string
*/
public $displayField = 'applicant_id';
public $order = "ApplicantDocument.created DESC";
/**
* Validation rules
*
* @var array
*/
public $validate = array(
'description' => array(
'notBlank' => array(
'rule' => array('notBlank'),
'message' => 'Please add description to this document.',
//'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' => ''
)
);
}