Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
16591 anikendra 1
<?php
2
/**
3
 * Test Plugin Post Model
4
 *
5
 * CakePHP : Rapid Development Framework (http://cakephp.org)
6
 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
7
 *
8
 * Licensed under The MIT License
9
 * For full copyright and license information, please see the LICENSE.txt
10
 * Redistributions of files must retain the above copyright notice.
11
 *
12
 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
13
 * @link          http://cakephp.org CakePHP Project
14
 * @package       Cake.Test.TestApp.Plugin.TestPlugin.Model
15
 * @since         CakePHP v 1.2.0.4487
16
 * @license       http://www.opensource.org/licenses/mit-license.php MIT License
17
 */
18
 
19
/**
20
 * Class TestPluginPost
21
 *
22
 * @package       Cake.Test.TestApp.Plugin.TestPlugin.Model
23
 */
24
class TestPluginPost extends TestPluginAppModel {
25
 
26
/**
27
 * Name property
28
 *
29
 * @var string
30
 */
31
	public $name = 'Post';
32
 
33
/**
34
 * useTable property
35
 *
36
 * @var string
37
 */
38
	public $useTable = 'posts';
39
 
40
/**
41
 * Validation rules
42
 *
43
 * @var array
44
 */
45
	public $validate = array(
46
		'title' => array(
47
			'rule' => array('custom', '.*'),
48
			'allowEmpty' => true,
49
			'required' => false,
50
			'message' => 'Post title is required'
51
		),
52
		'body' => array(
53
			'first_rule' => array(
54
				'rule' => array('custom', '.*'),
55
				'allowEmpty' => true,
56
				'required' => false,
57
				'message' => 'Post body is required'
58
			),
59
			'Post body is super required' => array(
60
				'rule' => array('custom', '.*'),
61
				'allowEmpty' => true,
62
				'required' => false,
63
			)
64
		),
65
	);
66
 
67
/**
68
 * Translation domain to use for validation messages
69
 *
70
 * @var string
71
 */
72
	public $validationDomain = 'test_plugin';
73
 
74
}