Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Subscription extends AppModel {
- var $name = 'Subscription';
- var $hasAndBelongsToMany = array(
- 'User'=>array('className'=>'User',
- 'joinTable' => 'users_subscriptions',
- 'foreignKey' => 'subscription_id',
- 'associationForeignKey' => 'user_id',
- 'unique' => true));
- // var $displayField = 'title';
- // var $validate = array(
- // 'subID' => 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
- // ),
- // ),
- // 'title' => 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
- // ),
- // 'alphanumeric' => array(
- // 'rule' => array('alphanumeric'),
- // //'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
- // ),
- // 'maxlength' => array(
- // 'rule' => array('maxlength'),
- // //'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
- // ),
- // ),
- // 'price' => array(
- // 'money' => array(
- // 'rule' => array('money'),
- // //'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
- // ),
- // '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
- // ),
- // ),
- // 'subscribers_count' => 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
- // ),
- // ),
- // );
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement