1 | <?php namespace FreedomCore\TrinityCore\Character\Models; |
||
10 | abstract class CharacterBaseModel extends Model |
||
11 | { |
||
12 | |||
13 | /** |
||
14 | * Connection name |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $connection = 'character'; |
||
18 | |||
19 | /** |
||
20 | * Table name |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $table; |
||
24 | |||
25 | /** |
||
26 | * Table primary key |
||
27 | * @var string |
||
28 | */ |
||
29 | protected $primaryKey; |
||
30 | |||
31 | /** |
||
32 | * Does that table supposed auto-increment |
||
33 | * @var string |
||
34 | */ |
||
35 | public $incrementing = false; |
||
36 | |||
37 | /** |
||
38 | * Doest that table includes timestamps generated |
||
39 | * by Laravel |
||
40 | * @var bool |
||
41 | */ |
||
42 | public $timestamps = false; |
||
43 | |||
44 | /** |
||
45 | * Columns which are allowed to be mass assigned |
||
46 | * @var array |
||
47 | */ |
||
48 | protected $fillable = []; |
||
49 | |||
50 | /** |
||
51 | * Cast value to specified data type. |
||
52 | * @var array |
||
53 | */ |
||
54 | protected $casts = []; |
||
55 | |||
56 | /** |
||
57 | * Key for configuration file containing database |
||
58 | * connection settings. |
||
59 | * @var string |
||
60 | */ |
||
61 | private $configurationKey = 'character.connections.character'; |
||
62 | |||
63 | /** |
||
64 | * CharacterBaseModel constructor. |
||
65 | * @param array $attributes |
||
66 | */ |
||
67 | public function __construct(array $attributes = []) |
||
72 | |||
73 | /** |
||
74 | * Fake ID incrementation |
||
75 | * @return int |
||
76 | */ |
||
77 | public function scopeIncrementID() |
||
85 | |||
86 | /** |
||
87 | * Get Database Connection Settings |
||
88 | */ |
||
89 | protected function getDatabaseConnection() |
||
96 | } |
||
97 |