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 App::uses('DashboardAppModel', 'Dashboard.Model');
17
18 /**
19 * Class PlayerSoldier
20 */
21 class PlayerSoldier extends DashboardAppModel {
22
23 /**
24 * Database table
25 * @var string
26 */
27 public $useTable = 'user_soldiers';
28
29 /**
30 * Do we connect to B3 database?
31 *
32 * @var bool
33 */
34 public $b3Database = false;
35
36 /**
37 * Prefix
38 *
39 * @var string
40 */
41 public $tablePrefix = '';
42
43 /**
44 * Validation rules
45 *
46 * @var array
47 */
48 public $validate = array(
49 'server_id' => array(
50 'numeric' => array(
51 'rule' => array('numeric'),
52 ),
53 ),
54 'playerstats_id' => array(
55 'numeric' => array(
56 'rule' => array('numeric'),
57 ),
58 ),
59 );
60
61 /**
62 * belongsTo associations
63 *
64 * @var array
65 */
66 public $belongsTo = array(
67 'User' => array(
68 'className' => 'Dashboard.User',
69 'foreignKey' => 'user_id',
70 ),
71 'Server' => array(
72 'className' => 'Dashboard.Server',
73 'foreignKey' => 'server_id',
74 ),
75 'PlayerStat' => array(
76 'className' => 'PlayerStat',
77 'foreignKey' => 'playerstats_id',
78 )
79 );
80
81 }
82