1 <?php
2 /**
3 * XLRstats : Real Time Player Stats (http://www.xlrstats.com)
4 * (CC) BY-NC-SA 2005-2013, Mark Weirath, Özgür Uysal
5 *
6 * Licensed under the Creative Commons BY-NC-SA 3.0 License
7 * Redistributions of files must retain the above copyright notice.
8 *
9 * @link http://www.xlrstats.com
10 * @license Creative Commons BY-NC-SA 3.0 License (http://creativecommons.org/licenses/by-nc-sa/3.0/)
11 * @package app.Plugin.Dashboard.Model
12 * @since XLRstats v3.0
13 * @version 0.1
14 */
15
16 class ServerGroup extends AppModel {
17
18 /**
19 * This is not a stats model, but a webfront configuration model
20 * @var bool
21 */
22 public $b3Database = false;
23
24 /**
25 * Name
26 *
27 * @var string
28 */
29 public $name = 'ServerGroup';
30
31 /**
32 * Tables
33 *
34 * @var string
35 */
36 public $useTable = 'server_groups';
37
38 /**
39 * Prefix
40 *
41 * @var string
42 */
43 public $tablePrefix = '';
44
45 /**
46 * Validation parameters
47 *
48 * @var array
49 */
50 public $validate = array(
51 'name' => array(
52 'required' => array(
53 'rule' => array('notEmpty'),
54 'required' => true,
55 'allowEmpty' => false,
56 'message' => 'Please enter a server group name.'
57 ),
58 'alpha' => array(
59 'rule' => array('alphaNumeric'),
60 'message' => 'Server group name can contain letters and numbers only. No space allowed.'
61 ),
62 'unique' => array(
63 'rule' => array('isUnique', 'name'),
64 'message' => 'This server group name is already in use.'
65 ),
66 ),
67 'description' => array(
68 'rule' => 'notEmpty',
69 'required' => true,
70 'allowEmpty' => false,
71 'message' => 'Please enter a description for this server group.'
72 )
73
74 );
75
76 }
77