Subversion Repositories SmartDukaan

Rev

Rev 13532 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
13532 anikendra 1
<?php
22429 amit.gupta 2
header("Access-Control-Allow-Origin: *");
13532 anikendra 3
App::uses('AppModel', 'Model');
4
/**
5
 * Order Model
6
 *
7
 * @property User $User
8
 * @property Store $Store
9
 * @property StoreOrder $StoreOrder
10
 */
11
class Order extends AppModel {
12
 
13
/**
14
 * Validation rules
15
 *
16
 * @var array
17
 */
18
	public $validate = array(
19
		'user_id' => array(
20
			'numeric' => array(
21
				'rule' => array('numeric'),
22
				//'message' => 'Your custom message here',
23
				//'allowEmpty' => false,
24
				//'required' => false,
25
				//'last' => false, // Stop validation after this rule
26
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
27
			),
28
		),
29
		'order_url' => array(
30
			'notEmpty' => array(
31
				'rule' => array('notEmpty'),
32
				//'message' => 'Your custom message here',
33
				//'allowEmpty' => false,
34
				//'required' => false,
35
				//'last' => false, // Stop validation after this rule
36
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
37
			),
38
		),
39
		'rawhtml' => array(
40
			'notEmpty' => array(
41
				'rule' => array('notEmpty'),
42
				//'message' => 'Your custom message here',
43
				//'allowEmpty' => false,
44
				//'required' => false,
45
				//'last' => false, // Stop validation after this rule
46
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
47
			),
48
		),
49
	);
50
 
51
	//The Associations below have been created with all possible keys, those that are not needed can be removed
52
 
53
/**
54
 * belongsTo associations
55
 *
56
 * @var array
57
 */
58
	public $belongsTo = array(
59
		'User' => array(
60
			'className' => 'User',
61
			'foreignKey' => 'user_id',
62
			'conditions' => '',
63
			'fields' => '',
64
			'order' => ''
65
		),
66
		'Store' => array(
67
			'className' => 'Store',
68
			'foreignKey' => 'store_id',
69
			'conditions' => '',
70
			'fields' => '',
71
			'order' => ''
72
		)
73
	);
74
}