-
Notifications
You must be signed in to change notification settings - Fork 0
/
Constants.php
47 lines (42 loc) · 1.11 KB
/
Constants.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
namespace Shinka\Persona;
use Shinka\Persona\Entity\TableSchema;
/**
* Convenient access to constants.
*/
class Constants
{
/** @var string Database table name */
public static $table = 'xf_shinka_persona';
/**
* @return \Shinka\Persona\Entity\TableSchema
*/
public static function tableSchema()
{
$data = [
'name' => Constants::$table,
'primary_key' => 'persona_id',
'columns' => [
[
'name' => 'persona_id',
'type' => 'int',
'autoIncrement' => true
],
[
'name' => 'parent_id',
'type' => 'int',
],
[
'name' => 'user_id',
'type' => 'int',
],
[
'name' => 'approved',
'type' => 'tinyint',
'default' => 0,
]
],
];
return new TableSchema($data['name'], $data['primary_key'], $data['columns']);
}
}