-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathschema.php
More file actions
146 lines (138 loc) · 8.57 KB
/
schema.php
File metadata and controls
146 lines (138 loc) · 8.57 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<?php
/**
* Schema file
*
* @author Noriko Arai <arai@nii.ac.jp>
* @author Shohei Nakajima <nakajimashouhei@gmail.com>
* @link http://www.netcommons.org NetCommons Project
* @license http://www.netcommons.org/license.txt NetCommons License
* @copyright Copyright 2014, NetCommons Project
*/
/**
* Schema file
*
* @author Shohei Nakajima <nakajimashouhei@gmail.com>
* @package NetCommons\NetCommons\Config\Schema
* @SuppressWarnings(PHPMD.LongVariable)
* @SuppressWarnings(PHPMD.TooManyFields)
*/
class UsersSchema extends CakeSchema {
/**
* Database connection
*
* @var string
*/
public $connection = 'master';
/**
* before
*
* @param array $event event
* @return bool
*/
public function before($event = array()) {
return true;
}
/**
* after
*
* @param array $event event
* @return void
*/
public function after($event = array()) {
}
/**
* user_select_counts table
*
* @var array
*/
public $user_select_counts = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'),
'user_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'index'),
'select_count' => array('type' => 'integer', 'null' => false, 'default' => '0', 'unsigned' => false),
'created_user' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false),
'created' => array('type' => 'datetime', 'null' => true, 'default' => null),
'modified_user' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false),
'modified' => array('type' => 'datetime', 'null' => true, 'default' => null),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1),
'user_id' => array('column' => 'user_id', 'unique' => 0)
),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
);
/**
* users table
*
* @var array
*/
public $users = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'),
'username' => array('type' => 'string', 'null' => false, 'default' => null, 'key' => 'index', 'collate' => 'utf8_bin', 'comment' => 'ログインID', 'charset' => 'utf8'),
'password' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => 'パスワード', 'charset' => 'utf8'),
'key' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => 'リンク識別子', 'charset' => 'utf8'),
'activate_key' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => 'アクティベートキー', 'charset' => 'utf8'),
'activated' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => 'アクティベート日時', 'charset' => 'utf8'),
'is_deleted' => array('type' => 'boolean', 'null' => false, 'default' => '0', 'key' => 'index'),
'is_avatar_public' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
'is_avatar_auto_created' => array('type' => 'boolean', 'null' => false, 'default' => '1'),
'handlename' => array('type' => 'string', 'null' => true, 'default' => null, 'key' => 'index', 'collate' => 'utf8_general_ci', 'comment' => 'ハンドル', 'charset' => 'utf8'),
'is_handlename_public' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
'is_name_public' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
'email' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => 'eメール', 'charset' => 'utf8'),
'is_email_public' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
'is_email_reception' => array('type' => 'boolean', 'null' => false, 'default' => '1'),
'moblie_mail' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => '携帯メール', 'charset' => 'utf8'),
'is_moblie_mail_public' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
'is_moblie_mail_reception' => array('type' => 'boolean', 'null' => false, 'default' => '1'),
'sex' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => '性別', 'charset' => 'utf8'),
'is_sex_public' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
'language' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
'is_language_public' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
'timezone' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => 'タイムゾーン', 'charset' => 'utf8'),
'is_timezone_public' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
'role_key' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => '権限', 'charset' => 'utf8'),
'is_role_key_public' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
'status' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => '状態', 'charset' => 'utf8'),
'is_status_public' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
'created' => array('type' => 'datetime', 'null' => true, 'default' => null, 'comment' => '作成日時'),
'is_created_public' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
'created_user' => array('type' => 'integer', 'null' => true, 'default' => '0', 'unsigned' => false, 'comment' => '作成者'),
'is_created_user_public' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
'modified' => array('type' => 'datetime', 'null' => true, 'default' => null, 'comment' => '更新日時'),
'is_modified_public' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
'modified_user' => array('type' => 'integer', 'null' => true, 'default' => '0', 'unsigned' => false, 'comment' => '更新者'),
'is_modified_user_public' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
'password_modified' => array('type' => 'datetime', 'null' => true, 'default' => null, 'comment' => 'パスワード変更日時'),
'is_password_modified_public' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
'last_login' => array('type' => 'datetime', 'null' => true, 'default' => null, 'comment' => '最終ログイン日時'),
'is_last_login_public' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
'previous_login' => array('type' => 'datetime', 'null' => true, 'default' => null, 'comment' => '前回ログイン日時'),
'is_previous_login_public' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
'is_profile_public' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
'is_search_keywords_public' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1),
'username' => array('column' => 'username', 'unique' => 0),
'userlist' => array('column' => array('is_deleted', 'id'), 'unique' => 0),
'handlename' => array('column' => array('handlename', 'is_deleted'), 'unique' => 0)
),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
);
/**
* users_languages table
*
* @var array
*/
public $users_languages = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary'),
'user_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'index'),
'language_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 6, 'unsigned' => false),
'name' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => '氏名', 'charset' => 'utf8'),
'profile' => array('type' => 'text', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => 'プロフィール', 'charset' => 'utf8'),
'search_keywords' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => '検索キーワード', 'charset' => 'utf8'),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1),
'user_id' => array('column' => array('user_id', 'language_id'), 'unique' => 0)
),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
);
}