-
Notifications
You must be signed in to change notification settings - Fork 0
/
db_layout.xml
239 lines (231 loc) · 11 KB
/
db_layout.xml
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
<?xml version="1.0" encoding="utf-8" ?>
<!-- SQL XML created by WWW SQL Designer, https://github.com/ondras/wwwsqldesigner/ -->
<!-- Active URL: http://ondras.zarovi.cz/sql/demo/?keyword=default -->
<sql>
<datatypes db="sqlite">
<group color="rgb(238,238,170)" label="Integer">
<type label="TinyInt" quote="" sql="tinyint" length="0" re="INT" note="Integer data: 0 to 255" bytes="1"/>
<type label="SmallInt" quote="" sql="smallint" length="0" re="INT" note="Integer data: -32,768 to 32,767" bytes="2"/>
<type label="Int" quote="" sql="int" length="0" re="INT" note="Integer data: -2,147,483,648 to 2,147,483,647" bytes="4"/>
<type label="BigInt" quote="" sql="bigint" length="0" re="INT" note="Integer data: -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807" bytes="8"/>
</group>
<group color="rgb(238,238,170)" label="Monetary">
<type label="Money" quote="" sql="money" length="0" re="FLOAT" note="Integer data: -922,337,203,685,477.5808 to 922,337,203,685,477.5807" bytes="8"/>
<type label="SmallMoney" quote="" sql="smallmoney" length="0" re="FLOAT" note="-214,748.3648 to 214,748.3647" bytes="4"/>
</group>
<group color="rgb(238,238,170)" label="Numeric">
<type label="Real" quote="" sql="real" length="0" re="FLOAT" note="Floating precision number data: -3.402823E+38 to 3.402823E+38" bytes="4"/>
<type label="Float" quote="" sql="float" length="0" re="FLOAT" note="Floating precision number data: -4.94E+324 to 4.94E+324" bytes="8"/>
<type label="Decimal" quote="" sql="decimal" length="1" re="DEC" note="Fixed precision and scale numeric data: -10^38 +1 to 10^38 -1 (decimal and numeric are synonyms)" bytes="n*"/>
<type label="Numeric" quote="" sql="numeric" length="1" re="DEC" note="Fixed precision and scale numeric data: -10^38 +1 to 10^38 -1 (decimal and numeric are synonyms)" bytes="n*"/>
</group>
<group color="rgb(255,200,200)" label="Character">
<type label="Char" quote="'" sql="char" length="0" note="Fixed-length character data with a maximum length of 8,000 characters" bytes="n"/>
<type label="Varchar" quote="'" sql="varchar" length="1" note="Variable-length data with a maximum of 8,000 characters" bytes="m <= n"/>
<type label="Text" quote="'" sql="text" length="1" note="Variable-length data with a maximum length of 2,147,483,647 characters" bytes="<= 2,147,483,647"/>
<type label="XML" quote="'" sql="xml" length="0" note="XML" bytes="n"/>
</group>
<group color="rgb(255,200,200)" label="Unicode Character">
<type label="nChar" quote="'" sql="nchar" length="0" note="Fixed-length Unicode data with a maximum length of 4,000 characters" bytes="n"/>
<type label="nVarchar" quote="'" sql="nvarchar" length="1" note="Variable-length Unicode data with a maximum length of 4,000 characters" bytes="m <= n"/>
<type label="nText" quote="'" sql="ntext" length="1" note="Variable-length Unicode data with a maximum length of 1,073,741,823 characters" bytes="<= 2,147,483,647"/>
</group>
<group color="rgb(200,255,200)" label="Date & Time">
<type label="Datetime" quote="" sql="datetime" length="0" note="Jan 1, 1753 to Dec 31, 9999" bytes="8"/>
<type label="SmallDateTime" quote="" sql="smalldatetime" length="0" note="Jan 1, 1900 to Dec 31, 2079" bytes="4"/>
</group>
<group color="rgb(200,200,255)" label="Binary">
<type label="Binary" quote="'" sql="binary" length="0" note="Fixed-length binary data with a maximum length of 8,000 bytes" bytes="n"/>
<type label="Varbinary" quote="'" sql="varbinary" length="1" note="Variable-length binary data with a maximum length of 8,000 bytes" bytes="m <= n"/>
</group>
<group color="rgb(200,220,255)" label="Miscellaneous">
<type label="Bit" quote="" sql="bit" length="0" note="Boolean: 1 or 0" bytes="1"/>
<type label="Image" quote="" sql="image" length="1" re="BLOB" note="Variable-length binary data with a maximum length of 2,147,483,647 bytes" bytes="0 to 2,147,483,647"/>
<type label="Timestamp" quote="" sql="timestamp" length="0" note="Locally unique binary number updated as a row gets updated" bytes="8"/>
<type label="SQL Variant" quote="" sql="sql_variant" length="1" note="Stores any datatype except text, ntext, image, timestamp" bytes=""/>
<type label="Uniqueidentifier" quote="" sql="uniqueidentifier" length="1" note="GUID" bytes="16"/>
</group>
</datatypes>
<table x="289" y="232" name="Users">
<row name="id" null="0" autoincrement="1">
<datatype>int</datatype>
</row>
<row name="email" null="1" autoincrement="0">
<datatype>varchar(30)</datatype>
<default>NULL</default>
</row>
<row name="name" null="1" autoincrement="0">
<datatype>varchar(20)</datatype>
<default>NULL</default>
</row>
<row name="password" null="1" autoincrement="0">
<datatype>varchar(50)</datatype>
<default>NULL</default>
</row>
<row name="createdAt" null="1" autoincrement="0">
<datatype>datetime(13)</datatype>
<default>NULL</default>
</row>
<row name="updatedAt" null="1" autoincrement="0">
<datatype>datetime(13)</datatype>
<default>NULL</default>
</row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
</table>
<table x="460" y="292" name="Tasks">
<row name="id" null="0" autoincrement="1">
<datatype>int</datatype>
</row>
<row name="name" null="1" autoincrement="0">
<datatype>char(10)</datatype>
<default>NULL</default>
</row>
<row name="description" null="1" autoincrement="0">
<datatype>varchar</datatype>
<default>NULL</default>
</row>
<row name="repare" null="1" autoincrement="0">
<datatype>varchar</datatype>
<default>NULL</default>
</row>
<row name="startDate" null="1" autoincrement="0">
<datatype>datetime</datatype>
<default>NULL</default>
</row>
<row name="interval" null="1" autoincrement="0">
<datatype>int</datatype>
<default>NULL</default>
</row>
<row name="userId" null="1" autoincrement="0">
<datatype>tinyint</datatype>
<default>NULL</default>
<relation table="Users" row="id" />
</row>
<row name="createdAt" null="1" autoincrement="0">
<datatype>datetime</datatype>
<default>NULL</default>
</row>
<row name="updatedAt" null="1" autoincrement="0">
<datatype>datetime</datatype>
<default>NULL</default>
</row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
<key type="INDEX" name="">
<part>id</part>
</key>
</table>
<table x="638" y="238" name="MachineTasks">
<row name="id" null="0" autoincrement="1">
<datatype>int</datatype>
</row>
<row name="done" null="1" autoincrement="0">
<datatype>varchar</datatype>
<default>NULL</default>
</row>
<row name="machineId" null="1" autoincrement="0">
<datatype>int</datatype>
<default>1</default>
<relation table="Machines" row="id" />
<comment>1=菜单;2=权限</comment>
</row>
<row name="taskId" null="1" autoincrement="0">
<datatype>int</datatype>
<default>NULL</default>
<relation table="Tasks" row="id" />
</row>
<row name="createdAt" null="1" autoincrement="0">
<datatype>datetime</datatype>
<default>NULL</default>
</row>
<row name="updatedAt" null="1" autoincrement="0">
<datatype>datetime</datatype>
<default>NULL</default>
</row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
</table>
<table x="884" y="178" name="Logs">
<row name="id" null="0" autoincrement="1">
<datatype>int</datatype>
</row>
<row name="status" null="1" autoincrement="0">
<datatype>varchar(3)</datatype>
<default>NULL</default>
</row>
<row name="task" null="1" autoincrement="0">
<datatype>varchar</datatype>
<default>NULL</default>
</row>
<row name="description" null="1" autoincrement="0">
<datatype>text</datatype>
<default>NULL</default>
</row>
<row name="repare" null="1" autoincrement="0">
<datatype>text</datatype>
<default>NULL</default>
</row>
<row name="machine" null="1" autoincrement="0">
<datatype>varchar(255)</datatype>
<default>NULL</default>
</row>
<row name="interval" null="1" autoincrement="0">
<datatype>int</datatype>
<default>NULL</default>
</row>
<row name="user" null="1" autoincrement="0">
<datatype>varchar</datatype>
<default>NULL</default>
</row>
<row name="comment" null="1" autoincrement="0">
<datatype>varchar</datatype>
<default>NULL</default>
</row>
<row name="createdAt" null="1" autoincrement="0">
<datatype>datetime</datatype>
<default>NULL</default>
</row>
<row name="updatedAt" null="1" autoincrement="0">
<datatype>datetime</datatype>
<default>NULL</default>
</row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
</table>
<table x="455" y="80" name="Machines">
<row name="id" null="0" autoincrement="1">
<datatype>int</datatype>
</row>
<row name="name" null="1" autoincrement="0">
<datatype>char</datatype>
</row>
<row name="type" null="1" autoincrement="0">
<datatype>varchar</datatype>
</row>
<row name="kanteleId" null="1" autoincrement="0">
<datatype>int</datatype>
<default>NULL</default>
</row>
<row name="userId" null="1" autoincrement="0">
<datatype>int</datatype>
<default>NULL</default>
<relation table="Users" row="id" />
</row>
<row name="createdAt" null="1" autoincrement="0">
<datatype>datetime</datatype>
<default>NULL</default>
</row>
<row name="updatedAt" null="1" autoincrement="0">
<datatype>datetime</datatype>
<default>NULL</default>
</row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
</table>
</sql>