Subversion Repositories SmartDukaan

Rev

Blame | Last modification | View Log | RSS feed

<?php
App::uses('AppModel', 'Model');
/**
 * PlayStoreLink Model
 *
 * @property Agent $Agent
 * @property Call $Call
 */
class PlayStoreLink extends AppModel {

/**
 * Display field
 *
 * @var string
 */
        public $displayField = 'id';

/**
 * Validation rules
 *
 * @var array
 */
        public $validate = array(
                'agent_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
                        ),
                ),
                'retailer_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
                        ),
                ),
                'call_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
                        ),
                ),
        );

        //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(
                'Agent' => array(
                        'className' => 'Agent',
                        'foreignKey' => 'agent_id',
                        'conditions' => '',
                        'fields' => '',
                        'order' => ''
                ),
                'Call' => array(
                        'className' => 'Call',
                        'foreignKey' => 'call_id',
                        'conditions' => '',
                        'fields' => '',
                        'order' => ''
                )
        );
}