-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.php
More file actions
113 lines (105 loc) · 7.16 KB
/
schema.php
File metadata and controls
113 lines (105 loc) · 7.16 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
<?php
/**
* CabinetsSchema
*/
/**
* Class CabinetsSchema
*/
class CabinetsSchema extends CakeSchema {
/**
* @var string connection
*/
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()) {
}
/**
* @var array cabinet_file_trees
*/
public $cabinet_file_trees = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary', 'comment' => 'ID'),
'cabinet_key' => array('type' => 'string', 'null' => false, 'default' => null, 'key' => 'index', 'collate' => 'utf8_general_ci', 'comment' => 'キャビネットキー', 'charset' => 'utf8'),
'cabinet_file_key' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => 'ファイルキー', 'charset' => 'utf8'),
'parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false, 'key' => 'index', 'comment' => '親フォルダのID treeビヘイビア必須カラム'),
'lft' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'index', 'comment' => 'lft treeビヘイビア必須カラム'),
'rght' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'comment' => 'rght treeビヘイビア必須カラム'),
'created_user' => array('type' => 'integer', 'null' => true, 'default' => '0', 'unsigned' => false, 'comment' => '作成者'),
'created' => array('type' => 'datetime', 'null' => true, 'default' => null, 'comment' => '作成日時'),
'modified_user' => array('type' => 'integer', 'null' => true, 'default' => '0', 'unsigned' => false, 'comment' => '更新者'),
'modified' => array('type' => 'datetime', 'null' => true, 'default' => null, 'comment' => '更新日時'),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1),
'parent_id' => array('column' => 'parent_id', 'unique' => 0),
'cabinet_key' => array('column' => array('cabinet_key', 'lft', 'rght'), 'unique' => 0),
'lft' => array('column' => array('lft', 'rght'), 'unique' => 0)
),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
);
/**
* @var array cabinet_files
*/
public $cabinet_files = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary', 'comment' => 'ID'),
'cabinet_key' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => 'キャビネットキー', 'charset' => 'utf8'),
'cabinet_file_tree_parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false),
'cabinet_file_tree_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false),
'key' => array('type' => 'string', 'null' => false, 'default' => null, 'key' => 'index', 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
'is_folder' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
'use_auth_key' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
'status' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 4, 'unsigned' => false, 'comment' => '公開状況 1:公開中、2:公開申請中、3:下書き中、4:差し戻し'),
'is_active' => array('type' => 'boolean', 'null' => false, 'default' => '0'),
'is_latest' => array('type' => 'boolean', 'null' => true, 'default' => null),
'language_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false),
'is_origin' => array('type' => 'boolean', 'null' => false, 'default' => '1', 'comment' => 'オリジナルかどうか'),
'is_translation' => array('type' => 'boolean', 'null' => false, 'default' => '0', 'comment' => '翻訳したかどうか'),
'is_original_copy' => array('type' => 'boolean', 'null' => false, 'default' => '0', 'comment' => 'オリジナルのコピー。言語を新たに追加したときに使用する'),
'filename' => array('type' => 'string', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => 'タイトル', 'charset' => 'utf8'),
'description' => array('type' => 'text', 'null' => true, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => '概要', 'charset' => 'utf8'),
'created_user' => array('type' => 'integer', 'null' => true, 'default' => '0', 'unsigned' => false, 'comment' => '作成者'),
'created' => array('type' => 'datetime', 'null' => true, 'default' => null, 'comment' => '作成日時'),
'modified_user' => array('type' => 'integer', 'null' => true, 'default' => '0', 'unsigned' => false, 'comment' => '更新者'),
'modified' => array('type' => 'datetime', 'null' => true, 'default' => null, 'comment' => '更新日時'),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1),
'key' => array('column' => array('key', 'language_id'), 'unique' => 0)
),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
);
/**
* @var array cabinets
*/
public $cabinets = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'primary', 'comment' => 'ID'),
'block_id' => array('type' => 'integer', 'null' => false, 'default' => null, 'unsigned' => false, 'key' => 'index'),
'language_id' => array('type' => 'integer', 'null' => true, 'default' => '2', 'length' => 6, 'unsigned' => false, 'comment' => '言語ID'),
'is_origin' => array('type' => 'boolean', 'null' => false, 'default' => '1', 'comment' => 'オリジナルかどうか'),
'is_translation' => array('type' => 'boolean', 'null' => false, 'default' => '0', 'comment' => '翻訳したかどうか'),
'is_original_copy' => array('type' => 'boolean', 'null' => false, 'default' => '0', 'comment' => 'オリジナルのコピー。言語を新たに追加したときに使用する'),
'name' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => 'CABINET名', 'charset' => 'utf8'),
'key' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'comment' => 'キャビネットキー', 'charset' => 'utf8'),
'total_size' => array('type' => 'float', 'null' => false, 'default' => '0', 'unsigned' => false),
'created_user' => array('type' => 'integer', 'null' => true, 'default' => '0', 'unsigned' => false, 'comment' => '作成者'),
'created' => array('type' => 'datetime', 'null' => true, 'default' => null, 'comment' => '作成日時'),
'modified_user' => array('type' => 'integer', 'null' => true, 'default' => '0', 'unsigned' => false, 'comment' => '更新者'),
'modified' => array('type' => 'datetime', 'null' => true, 'default' => null, 'comment' => '更新日時'),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1),
'block_id' => array('column' => 'block_id', 'unique' => 0)
),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'InnoDB')
);
}