h-you / branches / ddl / ProcessManagement.sql @ 280
履歴 | 表示 | アノテート | ダウンロード (108 KB)
1 |
-- Project Name : noname
|
---|---|
2 |
-- Date/Time : 2017/10/05 15:29:38
|
3 |
-- Author : Horiuchi
|
4 |
-- RDBMS Type : MySQL
|
5 |
-- Application : A5:SQL Mk-2
|
6 |
|
7 |
-- ?S????s???\??f?[?^
|
8 |
drop table if exists actionscheduledata cascade; |
9 |
|
10 |
create table actionscheduledata ( |
11 |
TargetDate date not null comment '????' |
12 |
, PersonCode decimal(8,0) not null comment '?S????R?[?h' |
13 |
, ActionSchedule varchar(30) comment '?s???\??' |
14 |
, TargetYear year(4) not null comment '?Y???N' |
15 |
, TargetMonth year(4) not null comment '?Y????' |
16 |
, TargetDay year(4) not null comment '?Y????' |
17 |
, EntryDate datetime not null comment '?o?^???t' |
18 |
, UpdateDate datetime not null comment '?X?V???t' |
19 |
, constraint actionscheduledata_PKC primary key (TargetDate,PersonCode) |
20 |
) comment '?S????s???\??f?[?^' ; |
21 |
|
22 |
create index ActionScheduleData_Index1 |
23 |
on actionscheduledata(TargetYear);
|
24 |
|
25 |
create index ActionScheduleData_Index2 |
26 |
on actionscheduledata(TargetMonth);
|
27 |
|
28 |
create index ActionScheduleData_Index3 |
29 |
on actionscheduledata(TargetDay);
|
30 |
|
31 |
-- ???F?o?H?}?X?^
|
32 |
drop table if exists approvalmaster cascade; |
33 |
|
34 |
create table approvalmaster ( |
35 |
ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???' |
36 |
, DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h' |
37 |
, SeqNo decimal(2,0) not null comment '?}??' |
38 |
, DisplayOrder decimal(2,0) not null comment '?\????' |
39 |
, ApprovalPerson decimal(8,0) unsigned not null comment '???F??R?[?h' |
40 |
, ApprovalAuthority decimal(1,0) not null comment '???F??????' |
41 |
, EntryDate datetime not null comment '?o?^???t' |
42 |
, UpdateDate datetime not null comment '?X?V???t' |
43 |
, constraint approvalmaster_PKC primary key (ApprovalCode,DepartmentCode,SeqNo) |
44 |
) comment '???F?o?H?}?X?^' ; |
45 |
|
46 |
-- ?o?????f?[?^
|
47 |
drop table if exists attendancedailydata cascade; |
48 |
|
49 |
create table attendancedailydata ( |
50 |
PersonCode decimal(8,0) unsigned not null comment '????R?[?h' |
51 |
, AttendanceDate date not null comment '???????' |
52 |
, SeqNo decimal(3,0) unsigned not null comment '????s???' |
53 |
, ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
54 |
, ActionResult varchar(30) not null comment '?s??????' |
55 |
, StartTime datetime comment '?J?n????' |
56 |
, CompTime datetime comment '?I??????' |
57 |
, DayTimes decimal(4,1) not null comment '????????v????' |
58 |
, WorkingComment varchar(120) comment '?R?????g' |
59 |
, NightFlg decimal(1,0) not null comment '?????t???O' |
60 |
, EntryDate datetime not null comment '?o?^???t' |
61 |
, UpdateDate datetime not null comment '?X?V???t' |
62 |
, constraint attendancedailydata_PKC primary key (PersonCode,AttendanceDate,SeqNo) |
63 |
) comment '?o?????f?[?^' ; |
64 |
|
65 |
create index AttendDaily_Index1 |
66 |
on attendancedailydata(ConstructionCode);
|
67 |
|
68 |
create index AttendDaily_Index2 |
69 |
on attendancedailydata(AttendanceDate);
|
70 |
|
71 |
-- ?o?????f?[?^
|
72 |
drop table if exists attendancedata cascade; |
73 |
|
74 |
create table attendancedata ( |
75 |
PersonCode decimal(8,0) unsigned not null comment '????R?[?h' |
76 |
, AttendanceMonth date not null comment '?o?????N??' |
77 |
, LastDays decimal(2,0) unsigned not null comment '??????I??' |
78 |
, AttendDayCount decimal(2,0) unsigned not null comment '?o?????' |
79 |
, TotalOverTimes decimal(4,1) not null comment '?c??????' |
80 |
, OrderDate date not null comment '?\????' |
81 |
, OrderNo decimal(2,0) unsigned not null comment '?\????t???' |
82 |
, EntryDate datetime not null comment '?o?^???t' |
83 |
, UpdateDate datetime not null comment '?X?V???t' |
84 |
, constraint attendancedata_PKC primary key (PersonCode,AttendanceMonth) |
85 |
) comment '?o?????f?[?^' ; |
86 |
|
87 |
-- ??s?c????}?X?^
|
88 |
drop table if exists bankbusinessdaymaster cascade; |
89 |
|
90 |
create table bankbusinessdaymaster ( |
91 |
YEARMONTH decimal(6,0) default '0' not null comment '?N??' |
92 |
, BANKBUSINESSDAY decimal(2,0) default '0' not null comment '??s?c???' |
93 |
, NOTE varchar(120) comment '???l' |
94 |
, DELETEFLG decimal(1,0) comment '???t???O' |
95 |
, ENTRYDATE datetime comment '?o?^?N????' |
96 |
, UPDATEDATE datetime comment '?X?V?N????' |
97 |
, constraint bankbusinessdaymaster_PKC primary key (YEARMONTH,BANKBUSINESSDAY) |
98 |
) comment '??s?c????}?X?^' ; |
99 |
|
100 |
-- ???????f?[?^
|
101 |
drop table if exists billingdata cascade; |
102 |
|
103 |
create table billingdata ( |
104 |
COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h' |
105 |
, TARGETDATE decimal(6,0) default '0' not null comment '???N??' |
106 |
, SEQNO decimal(3,0) default '0' not null comment '?A??' |
107 |
, BILLPRICE decimal(10,0) comment '???????z' |
108 |
, ENTRYDATE datetime comment '?o?^?N????' |
109 |
, UPDATEDATE datetime comment '?X?V?N????' |
110 |
, constraint billingdata_PKC primary key (COMPANYCODE,TARGETDATE,SEQNO) |
111 |
) comment '???????f?[?^' ; |
112 |
|
113 |
-- ??????????f?[?^
|
114 |
drop table if exists billingdatadetail cascade; |
115 |
|
116 |
create table billingdatadetail ( |
117 |
COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h' |
118 |
, TARGETDATE decimal(6,0) default '0' not null comment '???N??' |
119 |
, SEQNO decimal(3,0) default '0' not null comment '?A??' |
120 |
, LINECOUNT decimal(3,0) default '0' not null comment '?s???' |
121 |
, CONSTRUCTIONCODE decimal(10,0) comment '?H?????' |
122 |
, CONSTRUCTIONROWCNT decimal(3,0) default '0' not null comment '?s???' |
123 |
, CONSTRUCTIONCOLCNT decimal(3,0) default '0' not null comment '????' |
124 |
, FIELDNAME varchar(120) comment '????' |
125 |
, BILLPRICE decimal(10,0) comment '???????z' |
126 |
, HIGHWPRICE decimal(10,0) comment '??????' |
127 |
, HARDWPRICE decimal(10,0) comment '??????' |
128 |
, INDSWASTETAX decimal(10,0) comment '?Y?p??' |
129 |
, NOTE varchar(120) comment '???l' |
130 |
, ENTRYDATE datetime comment '?o?^?N????' |
131 |
, UPDATEDATE datetime comment '?X?V?N????' |
132 |
, constraint billingdatadetail_PKC primary key (COMPANYCODE,TARGETDATE,SEQNO,LINECOUNT) |
133 |
) comment '??????????f?[?^' ; |
134 |
|
135 |
-- ???????x???T?}???[?f?[?^
|
136 |
drop table if exists billingpaymentsummary cascade; |
137 |
|
138 |
create table billingpaymentsummary ( |
139 |
COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h' |
140 |
, TARGETDATE decimal(6,0) default '0' not null comment '???N??' |
141 |
, CHARGEPAYMENTKIND decimal(1,0) default '0' not null comment '?????x????' |
142 |
, PAYDAY date comment '?x????' |
143 |
, BILLPRICESTOTAL decimal(10,0) comment '???????z???v' |
144 |
, CONSUMPTIONTAXRATE decimal(6,3) comment '??????' |
145 |
, CONSUMPTIONTAXPRICE decimal(10,0) comment '?????z' |
146 |
, HIGHWPRICESTOTAL decimal(10,0) comment '???????v' |
147 |
, HARDWPRICESTOTAL decimal(10,0) comment '???????v' |
148 |
, INDSWASTETAXSTOTAL decimal(10,0) comment '?Y?p????v' |
149 |
, CNSTRPRICERATE decimal(6,3) comment '???????' |
150 |
, CNSTRPRICESTOTAL decimal(10,0) comment '????????v' |
151 |
, BILLINGPRICETOTAL decimal(10,0) comment '???????z???v' |
152 |
, ENTRYDATE datetime comment '?o?^?N????' |
153 |
, UPDATEDATE datetime comment '?X?V?N????' |
154 |
, constraint billingpaymentsummary_PKC primary key (COMPANYCODE,TARGETDATE,CHARGEPAYMENTKIND) |
155 |
) comment '???????x???T?}???[?f?[?^' ; |
156 |
|
157 |
-- ?H???????f?[?^?y???p?z
|
158 |
drop table if exists bk_constructionledger cascade; |
159 |
|
160 |
create table bk_constructionledger ( |
161 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
162 |
, ConstructionPeriod decimal(4,0) unsigned not null comment '?????' |
163 |
, CreatorCode decimal(8,0) comment '????R?[?h' |
164 |
, CreatorName varchar(60) comment '?????' |
165 |
, CreateDate date not null comment '????' |
166 |
, ConstructionTimes decimal(5,2) not null comment '?H???i?P??E???j' |
167 |
, ConstructionStart date not null comment '?_??H???J?n' |
168 |
, ConstructionEnd date not null comment '?_??H??????' |
169 |
, OrdersDecisionPrice decimal(14,0) not null comment '??????????z' |
170 |
, CompanyExpenses decimal(10,0) not null comment '???o???v' |
171 |
, DepartmentExpenses decimal(10,0) not null comment '?????o???v' |
172 |
, SalesExpenses decimal(10,0) not null comment '?c??o???v' |
173 |
, TotalPayment decimal(10,0) not null comment '???x???z' |
174 |
, GrossProfit decimal(10,0) not null comment '?e??' |
175 |
, Allowance decimal(10,0) not null comment '???^' |
176 |
, NetProfit decimal(10,0) not null comment '?????v' |
177 |
, ComplateFlg decimal(1,0) not null comment '????????t???O' |
178 |
, IntegrationFlg decimal(1,0) not null comment '????z??Z?t???O' |
179 |
, EntryDate datetime not null comment '?o?^???t' |
180 |
, UpdateDate datetime not null comment '?X?V???t' |
181 |
, constraint bk_constructionledger_PKC primary key (ConstructionCode) |
182 |
) comment '?H???????f?[?^?y???p?z' ; |
183 |
|
184 |
-- ?H??????????f?[?^?y???p?z
|
185 |
drop table if exists bk_constructionledgerdetail cascade; |
186 |
|
187 |
create table bk_constructionledgerdetail ( |
188 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
189 |
, GroupCount decimal(2,0) unsigned not null comment '?O???[?v???' |
190 |
, LineCount decimal(5,0) unsigned not null comment '?s???' |
191 |
, ComponentCode decimal(5,0) unsigned not null comment '?\???L?[' |
192 |
, ItemCode decimal(5,0) unsigned not null comment '?H??L?[' |
193 |
, FirstString varchar(120) comment '???????' |
194 |
, SecondString varchar(120) comment '?H?????e' |
195 |
, CompanyType decimal(1,0) not null comment '??????R?[?h?^?C?v' |
196 |
, CompanyCode decimal(8,0) not null comment '??????R?[?h' |
197 |
, CompanyName varchar(120) comment '?????????' |
198 |
, EstimatePrice decimal(12,0) not null comment '?\?Z?i????j???z' |
199 |
, ExecutionAmount decimal(12,0) not null comment '???s???z' |
200 |
, AmountConfigRate decimal(5,2) not null comment '???z?\????' |
201 |
, PaymentBurden decimal(12,0) not null comment '?x????U?z' |
202 |
, FixDataFlg decimal(1,0) not null comment '???f?[?^?t???O' |
203 |
, IndependentFlg decimal(1,0) not null comment '????f?[?^?t???O' |
204 |
, FluctuationFlg decimal(1,0) not null comment '?????f?[?^?t???O' |
205 |
, SalaryFlg decimal(1,0) not null comment '???^?U????' |
206 |
, SalaryDays decimal(4,0) not null comment '???^?U??????' |
207 |
, OperatingFlg decimal(1,0) not null comment '?S?????t???O' |
208 |
, SourceCode decimal(10,0) unsigned not null comment '???H?????' |
209 |
, JoinTitleFlg decimal(1,0) not null comment '?H??????^?C?g??' |
210 |
, SalaryOnRegist decimal(12,0) not null comment '?o?^?????z???^' |
211 |
, PurchaseOrderFlg decimal(2,0) not null comment '?????????s?t???O' |
212 |
, EntryDate datetime not null comment '?o?^???t' |
213 |
, UpdateDate datetime not null comment '?X?V???t' |
214 |
, constraint bk_constructionledgerdetail_PKC primary key (ConstructionCode,GroupCount,LineCount) |
215 |
) comment '?H??????????f?[?^?y???p?z' ; |
216 |
|
217 |
-- ?H?????????s?f?[?^?y???p?z
|
218 |
drop table if exists bk_constructionledgerexcute cascade; |
219 |
|
220 |
create table bk_constructionledgerexcute ( |
221 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
222 |
, GroupCount decimal(2,0) unsigned not null comment '?O???[?v???' |
223 |
, LineCount decimal(5,0) unsigned not null comment '?s???' |
224 |
, ColumnCount decimal(3,0) not null comment '????' |
225 |
, PaymentAmount decimal(12,0) not null comment '?x?????z' |
226 |
, TargetMonth date not null comment '???N??' |
227 |
, EntryDate datetime not null comment '?o?^???t' |
228 |
, UpdateDate datetime not null comment '?X?V???t' |
229 |
, constraint bk_constructionledgerexcute_PKC primary key (ConstructionCode,GroupCount,LineCount,ColumnCount) |
230 |
) comment '?H?????????s?f?[?^?y???p?z' ; |
231 |
|
232 |
-- ??Z????f?[?^?y???p?z
|
233 |
drop table if exists bk_estimatedata cascade; |
234 |
|
235 |
create table bk_estimatedata ( |
236 |
SaveDate datetime not null comment '?????t' |
237 |
, ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
238 |
, LineCount decimal(3,0) unsigned not null comment '?s???' |
239 |
, ComponentCode decimal(5,0) unsigned not null comment '?\???L?[' |
240 |
, FixedItemCode varchar(1) comment '?????L?[' |
241 |
, ItemName varchar(120) comment '??????' |
242 |
, SpecName varchar(120) comment '???^?i???E?`??E???@' |
243 |
, PriceValue decimal(14,0) not null comment '???z' |
244 |
, note varchar(60) comment '???l' |
245 |
, MyExpensesFlg decimal(1,0) not null comment '????o??t???O' |
246 |
, InputFlg decimal(1,0) not null comment '????t???O' |
247 |
, EntryDate datetime not null comment '?o?^???t' |
248 |
, UpdateDate datetime not null comment '?X?V???t' |
249 |
, constraint bk_estimatedata_PKC primary key (SaveDate,ConstructionCode,LineCount) |
250 |
) comment '??Z????f?[?^?y???p?z' ; |
251 |
|
252 |
-- ??Z????y?[?W?f?[?^?y???p?z
|
253 |
drop table if exists bk_estimatedatabody cascade; |
254 |
|
255 |
create table bk_estimatedatabody ( |
256 |
SaveDate datetime not null comment '?????t' |
257 |
, ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
258 |
, PageCount decimal(4,0) unsigned not null comment '?y?[?W???' |
259 |
, Category decimal(1,0) not null comment '?y?[?W??' |
260 |
, UnionComponentCode decimal(5,0) unsigned not null comment '?????\???L?[' |
261 |
, ComponentCode decimal(5,0) unsigned not null comment '?\???L?[' |
262 |
, ItemCode decimal(5,0) unsigned not null comment '?H??L?[' |
263 |
, SelectComponent decimal(5,0) unsigned not null comment '?I???\???L?[' |
264 |
, PageTitle varchar(120) not null comment '?y?[?W?\????' |
265 |
, DetailLineCount decimal(3,0) unsigned not null comment '????s???' |
266 |
, EntryDate datetime not null comment '?o?^???t' |
267 |
, UpdateDate datetime not null comment '?X?V???t' |
268 |
, constraint bk_estimatedatabody_PKC primary key (SaveDate,ConstructionCode,PageCount) |
269 |
) comment '??Z????y?[?W?f?[?^?y???p?z' ; |
270 |
|
271 |
-- ??Z????f?[?^????y???p?z
|
272 |
drop table if exists bk_estimatedatadetail cascade; |
273 |
|
274 |
create table bk_estimatedatadetail ( |
275 |
SaveDate datetime not null comment '?????t' |
276 |
, ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
277 |
, PageCount decimal(4,0) unsigned not null comment '?y?[?W???' |
278 |
, LineCount decimal(3,0) unsigned not null comment '?s???' |
279 |
, DataType decimal(1,0) not null comment '?f?[?^???' |
280 |
, ComponentCode decimal(5,0) unsigned not null comment '?\???L?[' |
281 |
, ItemCode decimal(5,0) unsigned not null comment '?H??L?[' |
282 |
, SpecCode decimal(5,0) unsigned not null comment '???L?[' |
283 |
, ItemName varchar(120) comment '??????' |
284 |
, SpecName varchar(120) comment '???^?i???E?`??E???@' |
285 |
, Unitcount decimal(8,2) not null comment '????' |
286 |
, UnitName varchar(30) comment '?P?????' |
287 |
, UnitPrice decimal(9,2) not null comment '?P??' |
288 |
, LineTotal decimal(12,0) not null comment '???z' |
289 |
, note varchar(60) comment '???l' |
290 |
, CompanyCode decimal(8,0) not null comment '??????R?[?h' |
291 |
, MyExpensesFlg decimal(1,0) not null comment '????o??t???O' |
292 |
, InputFlg decimal(1,0) comment '????t???O' |
293 |
, EntryDate datetime not null comment '?o?^???t' |
294 |
, UpdateDate datetime not null comment '?X?V???t' |
295 |
, constraint bk_estimatedatadetail_PKC primary key (SaveDate,ConstructionCode,PageCount,LineCount) |
296 |
) comment '??Z????f?[?^????y???p?z' ; |
297 |
|
298 |
-- ?@?l?i?}?X?^
|
299 |
drop table if exists businesstypemaster cascade; |
300 |
|
301 |
create table businesstypemaster ( |
302 |
BusinessTypeCode decimal(5,0) unsigned not null comment '?@?l?i?R?[?h' |
303 |
, DisplayOrder decimal(5,0) unsigned not null comment '?\????' |
304 |
, BusinessTypeName varchar(100) not null comment '???' |
305 |
, EntryDate datetime not null comment '?o?^???t' |
306 |
, UpdateDate datetime not null comment '?X?V???t' |
307 |
, constraint businesstypemaster_PKC primary key (BusinessTypeCode) |
308 |
) comment '?@?l?i?}?X?^' ; |
309 |
|
310 |
create index BusinessTypeMaster_Index1 |
311 |
on businesstypemaster(DisplayOrder);
|
312 |
|
313 |
-- ????????}?X?^
|
314 |
drop table if exists commoncostlarge cascade; |
315 |
|
316 |
create table commoncostlarge ( |
317 |
LargeCode decimal(5,0) unsigned not null comment '????L?[' |
318 |
, DisplayOrder decimal(5,0) unsigned not null comment '?\????' |
319 |
, LargeName varchar(50) not null comment '???????' |
320 |
, CommentText varchar(120) comment '????????' |
321 |
, DeleteFlg decimal(1,0) not null comment '???t???O' |
322 |
, EntryDate datetime not null comment '?o?^???t' |
323 |
, UpdateDate datetime not null comment '?X?V???t' |
324 |
, constraint commoncostlarge_PKC primary key (LargeCode) |
325 |
) comment '????????}?X?^' ; |
326 |
|
327 |
-- ?????H???A?}?X?^
|
328 |
drop table if exists commoncostlinkms cascade; |
329 |
|
330 |
create table commoncostlinkms ( |
331 |
LargeCode decimal(5,0) unsigned not null comment '????L?[' |
332 |
, MiddleCode decimal(5,0) unsigned not null comment '??????L?[' |
333 |
, ItemCode decimal(5,0) unsigned not null comment '?H??L?[' |
334 |
, EntryDate datetime comment '?o?^???t' |
335 |
, UpdateDate datetime comment '?X?V???t' |
336 |
, constraint commoncostlinkms_PKC primary key (LargeCode,MiddleCode,ItemCode) |
337 |
) comment '?????H???A?}?X?^' ; |
338 |
|
339 |
-- ?????????}?X?^
|
340 |
drop table if exists commoncostmiddle cascade; |
341 |
|
342 |
create table commoncostmiddle ( |
343 |
LargeCode decimal(5,0) unsigned not null comment '????L?[' |
344 |
, MiddleCode decimal(5,0) unsigned not null comment '??????L?[' |
345 |
, DisplayOrder decimal(5,0) unsigned not null comment '?\????' |
346 |
, MiddleName varchar(50) not null comment '?????????' |
347 |
, CommentText varchar(120) comment '????????' |
348 |
, DeleteFlg decimal(1,0) not null comment '???t???O' |
349 |
, EntryDate datetime not null comment '?o?^???t' |
350 |
, UpdateDate datetime not null comment '?X?V???t' |
351 |
, constraint commoncostmiddle_PKC primary key (LargeCode,MiddleCode) |
352 |
) comment '?????????}?X?^' ; |
353 |
|
354 |
-- ?????????L?[?}?X?^
|
355 |
drop table if exists commoncostmiddlesearchword cascade; |
356 |
|
357 |
create table commoncostmiddlesearchword ( |
358 |
LargeCode decimal(5,0) unsigned not null comment '????L?[' |
359 |
, MiddleCode decimal(5,0) unsigned not null comment '??????L?[' |
360 |
, SeqNo decimal(5,0) unsigned not null comment '????' |
361 |
, SearchWord varchar(50) not null comment '????????' |
362 |
, EntryDate datetime not null comment '?o?^???t' |
363 |
, UpdateDate datetime not null comment '?X?V???t' |
364 |
, constraint commoncostmiddlesearchword_PKC primary key (LargeCode,MiddleCode,SeqNo) |
365 |
) comment '?????????L?[?}?X?^' ; |
366 |
|
367 |
-- ?\???H???A?}?X?^
|
368 |
drop table if exists componentlinkmaster cascade; |
369 |
|
370 |
create table componentlinkmaster ( |
371 |
ComponentCode decimal(5,0) unsigned not null comment '?\???L?[' |
372 |
, ItemCode decimal(5,0) unsigned not null comment '?H??L?[' |
373 |
, DisplayOrder decimal(5,0) unsigned comment '?\????' |
374 |
, EntryDate datetime not null comment '?o?^???t' |
375 |
, UpdateDate datetime not null comment '?X?V???t' |
376 |
, constraint componentlinkmaster_PKC primary key (ComponentCode,ItemCode) |
377 |
) comment '?\???H???A?}?X?^' ; |
378 |
|
379 |
create index ComponentLinkMaster_Index1 |
380 |
on componentlinkmaster(ComponentCode);
|
381 |
|
382 |
create index ComponentLinkMaster_Index2 |
383 |
on componentlinkmaster(ItemCode);
|
384 |
|
385 |
-- ?\???}?X?^
|
386 |
drop table if exists componentmaster cascade; |
387 |
|
388 |
create table componentmaster ( |
389 |
ComponentCode decimal(5,0) unsigned not null comment '?\???L?[' |
390 |
, DisplayOrder decimal(5,0) unsigned not null comment '?\????' |
391 |
, ComponentName varchar(120) not null comment '?\??????' |
392 |
, SubItemsFlg decimal(1,0) comment '???????t???O' |
393 |
, DirectInputFlg decimal(1,0) comment '???????t???O' |
394 |
, MyExpensesFlg decimal(1,0) comment '????o??t???O' |
395 |
, DeleteFlg decimal(1,0) not null comment '???t???O' |
396 |
, EntryDate datetime not null comment '?o?^???t' |
397 |
, UpdateDate datetime not null comment '?X?V???t' |
398 |
, constraint componentmaster_PKC primary key (ComponentCode) |
399 |
) comment '?\???}?X?^' ; |
400 |
|
401 |
create index ComponentMaster_Index1 |
402 |
on componentmaster(DisplayOrder);
|
403 |
|
404 |
-- ?\???H??????A?}?X?^
|
405 |
drop table if exists componenttotypemaster cascade; |
406 |
|
407 |
create table componenttotypemaster ( |
408 |
ComponentCode decimal(5,0) unsigned not null comment '?\???L?[' |
409 |
, TypeCode decimal(5,0) unsigned not null comment '?H?????R?[?h' |
410 |
, Dummy decimal(1,0) not null comment '?_?~?[????' |
411 |
, EntryDate datetime not null comment '?o?^???t' |
412 |
, UpdateDate datetime not null comment '?X?V???t' |
413 |
, constraint componenttotypemaster_PKC primary key (ComponentCode,TypeCode) |
414 |
) comment '?\???H??????A?}?X?^' ; |
415 |
|
416 |
create index ComponentToTypeMaster_Index1 |
417 |
on componenttotypemaster(ComponentCode);
|
418 |
|
419 |
create index ComponentToTypeMaster_Index2 |
420 |
on componenttotypemaster(TypeCode);
|
421 |
|
422 |
-- ?H????{???
|
423 |
drop table if exists constructionbaseinfo cascade; |
424 |
|
425 |
create table constructionbaseinfo ( |
426 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
427 |
, TyingFlg decimal(1,0) not null comment '?R?t?f?[?^?t???O' |
428 |
, JoinFlg decimal(1,0) not null comment '?????_??H???t???O' |
429 |
, ConstructionYear smallint(5) unsigned not null comment '?H???N?x' |
430 |
, ConstructionPeriod smallint(5) unsigned not null comment '?H??????' |
431 |
, RequestedDate date comment '??????' |
432 |
, EstimatesSubmitDeadline date comment '?????o????' |
433 |
, EstimatesSubmittedDate date comment '?????o??' |
434 |
, ProvisionalOrderDate date comment '?????' |
435 |
, OrderDate date comment '???' |
436 |
, OrderStartingDate date comment '?J?n?\???' |
437 |
, OrderCompletionDate date comment '?????\???' |
438 |
, PreparationStartDate date comment '?{?H?????J?n??' |
439 |
, ConstructionStartingDate date comment '?{?H?J?n??' |
440 |
, ConstructionCompletionDate date comment '?{?H??????' |
441 |
, NonOrderDate date comment '????' |
442 |
, OrdersDecisionPrice decimal(12,0) not null comment '??????????z' |
443 |
, OrdersDecisionPriceInTax decimal(12,0) not null comment '??????????z' |
444 |
, SalesPersonCode decimal(8,0) comment '?c??S?????' |
445 |
, ConstructionPersonCode decimal(8,0) not null comment '?H???S????' |
446 |
, ConstrSubPersonCode decimal(8,0) not null comment '?H?????S????' |
447 |
, ConstructionInstructor decimal(8,0) not null comment '?H???w????' |
448 |
, TransferConstruction decimal(8,0) not null comment '?H??????R?[?h' |
449 |
, TransferConstructionDate date comment '?H??????' |
450 |
, OrderersDivision decimal(5,0) not null comment '???????' |
451 |
, OrderersCode decimal(5,0) unsigned not null comment '??????R?[?h' |
452 |
, EstimatesExpirationDate date comment '????L??????' |
453 |
, ConstructionPeriodStart date comment '?_??H???J?n??' |
454 |
, ConstructionPeriodEnd date comment '?_??H??????' |
455 |
, ConstructionPeriodStart2 date comment '?_??H???J?n?i???????j' |
456 |
, ConstructionPeriodEnd2 date comment '?_??H???????i???????j' |
457 |
, StartDate date comment '?H???J?n??' |
458 |
, EndDate date comment '?H???I????' |
459 |
, PurchaseOrderMailingDate date comment '???????X????' |
460 |
, PurchaseOrderReturnDate date comment '???????????' |
461 |
, PurchaseOrderReturnCheckDate date comment '??????????m?F??' |
462 |
, ConsumptionTaxFlg decimal(1,0) not null comment '?????t???O' |
463 |
, PrimeContractorFlg decimal(1,0) not null comment '?????t???O' |
464 |
, SalesCostFlg decimal(1,0) not null comment '?c??o?????t???O' |
465 |
, ConstructionStatusFlg decimal(2,0) not null comment '?H?????t???O' |
466 |
, ConstructionType decimal(5,0) not null comment '?H?????R?[?h' |
467 |
, EstimateType decimal(1,0) not null comment '??????' |
468 |
, BillingStartDate date not null comment '?????????J?n??' |
469 |
, BillingDate date not null comment '??????' |
470 |
, BillingSplitFlg decimal(1,0) not null comment '??????t???O' |
471 |
, BillingSendDate date comment '???????X??/??n????' |
472 |
, LedgerComplateDate date not null comment '?H????????????????t' |
473 |
, EntryDate datetime not null comment '?o?^???t' |
474 |
, UpdateDate datetime not null comment '?X?V???t' |
475 |
, constraint constructionbaseinfo_PKC primary key (ConstructionCode) |
476 |
) comment '?H????{???' ; |
477 |
|
478 |
create index BaseInfo_Index1 |
479 |
on constructionbaseinfo(ConstructionStatusFlg);
|
480 |
|
481 |
create index BaseInfo_Index2 |
482 |
on constructionbaseinfo(EstimateType);
|
483 |
|
484 |
create index BaseInfo_Index3 |
485 |
on constructionbaseinfo(SalesPersonCode);
|
486 |
|
487 |
create index BaseInfo_Index4 |
488 |
on constructionbaseinfo(ConstructionPersonCode);
|
489 |
|
490 |
create index BaseInfo_Index5 |
491 |
on constructionbaseinfo(ConstructionInstructor);
|
492 |
|
493 |
create index BaseInfo_Index6 |
494 |
on constructionbaseinfo(ConstructionPeriod);
|
495 |
|
496 |
-- ?H????{????
|
497 |
drop table if exists constructionbaseinfodetail cascade; |
498 |
|
499 |
create table constructionbaseinfodetail ( |
500 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
501 |
, DetailNo decimal(2,0) not null comment '??????' |
502 |
, DetailString varchar(120) comment '??????e' |
503 |
, EntryDate datetime not null comment '?o?^???t' |
504 |
, UpdateDate datetime not null comment '?X?V???t' |
505 |
, constraint constructionbaseinfodetail_PKC primary key (ConstructionCode,DetailNo) |
506 |
) comment '?H????{????' ; |
507 |
|
508 |
create index BaseInfoDetail_Idx1 |
509 |
on constructionbaseinfodetail(ConstructionCode);
|
510 |
|
511 |
create index BaseInfoDetail_Idx2 |
512 |
on constructionbaseinfodetail(DetailNo);
|
513 |
|
514 |
-- ?H???{?H?\?Z?f?[?^
|
515 |
drop table if exists constructionbudget cascade; |
516 |
|
517 |
create table constructionbudget ( |
518 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
519 |
, CreatorCode decimal(8,0) not null comment '????R?[?h' |
520 |
, CreatorName varchar(60) comment '?????' |
521 |
, CreatorCosts decimal(11,0) not null comment '??????^' |
522 |
, AssistantCode decimal(8,0) not null comment '???S????R?[?h' |
523 |
, AssistantName varchar(60) comment '???S?????' |
524 |
, AssistantCosts decimal(11,0) not null comment '???S??????^' |
525 |
, InstructorCode decimal(8,0) not null comment '?H???w?????R?[?h' |
526 |
, InstructorName varchar(60) comment '?H???w??????' |
527 |
, InstructorCosts decimal(11,0) not null comment '?H???w???????^' |
528 |
, CreateDate date not null comment '????' |
529 |
, ConstructionTimes decimal(5,2) not null comment '?H???i?P??E???j' |
530 |
, ConstructionStart date not null comment '?_??H???J?n' |
531 |
, ConstructionEnd date not null comment '?_??H??????' |
532 |
, InstructorTimes decimal(5,2) not null comment '?w???????????' |
533 |
, SalaryFlg decimal(1,0) not null comment '???^?U????' |
534 |
, SalaryDays decimal(4,0) not null comment '?U??????' |
535 |
, A_SalaryFlg decimal(1,0) not null comment '???S??????^?U????' |
536 |
, A_SalaryDays decimal(4,0) not null comment '???S????U??????' |
537 |
, I_SalaryFlg decimal(1,0) not null comment '?w???????^?U????' |
538 |
, I_SalaryDays decimal(4,0) not null comment '?w?????U??????' |
539 |
, OrdersDecisionPrice decimal(12,0) not null comment '??????????z' |
540 |
, EntryDate datetime not null comment '?o?^???t' |
541 |
, UpdateDate datetime not null comment '?X?V???t' |
542 |
, constraint constructionbudget_PKC primary key (ConstructionCode) |
543 |
) comment '?H???{?H?\?Z?f?[?^' ; |
544 |
|
545 |
-- ?H???{?H?\?Z?f?[?^????
|
546 |
drop table if exists constructionbudgetdetail cascade; |
547 |
|
548 |
create table constructionbudgetdetail ( |
549 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
550 |
, GroupCount decimal(2,0) unsigned not null comment '?O???[?v???' |
551 |
, LineCount decimal(3,0) unsigned not null comment '?s???' |
552 |
, ComponentCode decimal(5,0) unsigned not null comment '?\???L?[' |
553 |
, ItemCode decimal(5,0) unsigned not null comment '?H??L?[' |
554 |
, FirstString varchar(120) comment '???????' |
555 |
, SecondString varchar(120) comment '?H?????e' |
556 |
, CompanyType decimal(1,0) not null comment '??????R?[?h?^?C?v' |
557 |
, CompanyCode decimal(8,0) not null comment '??????R?[?h' |
558 |
, CompanyName varchar(120) comment '?????????' |
559 |
, EstimatePrice decimal(12,0) not null comment '??Z????????z' |
560 |
, NegotiationPrice decimal(12,0) not null comment '??Z????????z' |
561 |
, OrderDesiredAmount decimal(12,0) not null comment '??????]???z' |
562 |
, ExecutionAmount decimal(12,0) not null comment '???s???z' |
563 |
, AmountConfigRate decimal(5,2) not null comment '???z?\????' |
564 |
, NegotiateFlg decimal(1,0) not null comment '?????????t???O' |
565 |
, EntryDate datetime not null comment '?o?^???t' |
566 |
, UpdateDate datetime not null comment '?X?V???t' |
567 |
, constraint constructionbudgetdetail_PKC primary key (ConstructionCode,GroupCount,LineCount) |
568 |
) comment '?H???{?H?\?Z?f?[?^????' ; |
569 |
|
570 |
-- ?H??}?X?^
|
571 |
drop table if exists constructionitemmaster cascade; |
572 |
|
573 |
create table constructionitemmaster ( |
574 |
ItemCode decimal(5,0) unsigned not null comment '?H??L?[' |
575 |
, DisplayOrder decimal(5,0) unsigned not null comment '?\????' |
576 |
, ItemName varchar(120) not null comment '?H????' |
577 |
, SubItemsFlg decimal(1,0) comment '???????t???O' |
578 |
, MyExpensesFlg decimal(1,0) not null comment '????o??t???O' |
579 |
, DeleteFlg decimal(1,0) not null comment '???t???O' |
580 |
, EntryDate datetime not null comment '?o?^???t' |
581 |
, UpdateDate datetime not null comment '?X?V???t' |
582 |
, constraint constructionitemmaster_PKC primary key (ItemCode) |
583 |
) comment '?H??}?X?^' ; |
584 |
|
585 |
-- ?H???????f?[?^
|
586 |
drop table if exists constructionledger cascade; |
587 |
|
588 |
create table constructionledger ( |
589 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
590 |
, ConstructionPeriod decimal(4,0) unsigned not null comment '?????' |
591 |
, CreatorCode decimal(8,0) comment '????R?[?h' |
592 |
, CreatorName varchar(60) comment '?????' |
593 |
, CreateDate date not null comment '????' |
594 |
, ConstructionTimes decimal(5,2) not null comment '?H???i?P??E???j' |
595 |
, ConstructionStart date not null comment '?_??H???J?n' |
596 |
, ConstructionEnd date not null comment '?_??H??????' |
597 |
, OrdersDecisionPrice decimal(14,0) not null comment '??????????z' |
598 |
, CompanyExpenses decimal(10,0) not null comment '???o???v' |
599 |
, DepartmentExpenses decimal(10,0) not null comment '?????o???v' |
600 |
, SalesExpenses decimal(10,0) not null comment '?c??o???v' |
601 |
, TotalPayment decimal(10,0) not null comment '???x???z' |
602 |
, GrossProfit decimal(10,0) not null comment '?e??' |
603 |
, Allowance decimal(10,0) not null comment '???^' |
604 |
, NetProfit decimal(10,0) not null comment '?????v' |
605 |
, ComplateFlg decimal(1,0) not null comment '????????t???O' |
606 |
, IntegrationFlg decimal(1,0) not null comment '????z??Z?t???O' |
607 |
, EntryDate datetime not null comment '?o?^???t' |
608 |
, UpdateDate datetime not null comment '?X?V???t' |
609 |
, constraint constructionledger_PKC primary key (ConstructionCode) |
610 |
) comment '?H???????f?[?^' ; |
611 |
|
612 |
-- ?H??????????f?[?^
|
613 |
drop table if exists constructionledgerdetail cascade; |
614 |
|
615 |
create table constructionledgerdetail ( |
616 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
617 |
, GroupCount decimal(2,0) unsigned not null comment '?O???[?v???' |
618 |
, LineCount decimal(3,0) unsigned not null comment '?s???' |
619 |
, ComponentCode decimal(5,0) unsigned not null comment '?\???L?[' |
620 |
, ItemCode decimal(5,0) unsigned not null comment '?H??L?[' |
621 |
, FirstString varchar(120) comment '???????' |
622 |
, SecondString varchar(120) comment '?H?????e' |
623 |
, CompanyType decimal(1,0) not null comment '??????R?[?h?^?C?v' |
624 |
, CompanyCode decimal(8,0) not null comment '??????R?[?h' |
625 |
, CompanyName varchar(120) comment '?????????' |
626 |
, EstimatePrice decimal(12,0) not null comment '?\?Z?i????j???z' |
627 |
, ExecutionAmount decimal(12,0) not null comment '???s???z' |
628 |
, AmountConfigRate decimal(5,2) not null comment '???z?\????' |
629 |
, PaymentBurden decimal(12,0) not null comment '?x????U?z' |
630 |
, FixDataFlg decimal(1,0) not null comment '???f?[?^?t???O' |
631 |
, IndependentFlg decimal(1,0) not null comment '????f?[?^?t???O' |
632 |
, FluctuationFlg decimal(1,0) not null comment '?????f?[?^?t???O' |
633 |
, SalaryFlg decimal(1,0) not null comment '???^?U????' |
634 |
, SalaryDays decimal(4,0) not null comment '???^?U??????' |
635 |
, OperatingFlg decimal(1,0) not null comment '?S?????t???O' |
636 |
, SourceCode decimal(10,0) unsigned not null comment '???H?????' |
637 |
, JoinTitleFlg decimal(1,0) not null comment '?H??????^?C?g??' |
638 |
, SalaryOnRegist decimal(12,0) not null comment '?o?^?????z???^' |
639 |
, PurchaseOrderFlg decimal(2,0) not null comment '?????????s?t???O' |
640 |
, EntryDate datetime not null comment '?o?^???t' |
641 |
, UpdateDate datetime not null comment '?X?V???t' |
642 |
, constraint constructionledgerdetail_PKC primary key (ConstructionCode,GroupCount,LineCount) |
643 |
) comment '?H??????????f?[?^' ; |
644 |
|
645 |
create index LedgerDetail_Index01 |
646 |
on constructionledgerdetail(ConstructionCode);
|
647 |
|
648 |
create index LedgerDetail_Index02 |
649 |
on constructionledgerdetail(GroupCount);
|
650 |
|
651 |
create index LedgerDetail_Index03 |
652 |
on constructionledgerdetail(SourceCode);
|
653 |
|
654 |
-- ?H?????????s?f?[?^
|
655 |
drop table if exists constructionledgerexcute cascade; |
656 |
|
657 |
create table constructionledgerexcute ( |
658 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
659 |
, GroupCount decimal(2,0) unsigned not null comment '?O???[?v???' |
660 |
, LineCount decimal(3,0) unsigned not null comment '?s???' |
661 |
, ColumnCount decimal(3,0) not null comment '????' |
662 |
, PaymentAmount decimal(12,0) not null comment '?x?????z' |
663 |
, TargetMonth date not null comment '???N??' |
664 |
, EntryDate datetime not null comment '?o?^???t' |
665 |
, UpdateDate datetime not null comment '?X?V???t' |
666 |
, constraint constructionledgerexcute_PKC primary key (ConstructionCode,GroupCount,LineCount,ColumnCount) |
667 |
) comment '?H?????????s?f?[?^' ; |
668 |
|
669 |
create index LedgerExcute_Index1 |
670 |
on constructionledgerexcute(ConstructionCode,TargetMonth,GroupCount,LineCount);
|
671 |
|
672 |
-- ?H???????N???
|
673 |
drop table if exists constructionlink cascade; |
674 |
|
675 |
create table constructionlink ( |
676 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
677 |
, FluctuationCode decimal(10,0) not null comment '?q?H?????' |
678 |
, LinkType decimal(1,0) not null comment '?????N???' |
679 |
, EntryDate datetime not null comment '?o?^???t' |
680 |
, UpdateDate datetime not null comment '?X?V???t' |
681 |
, constraint constructionlink_PKC primary key (ConstructionCode,FluctuationCode) |
682 |
) comment '?H???????N???' ; |
683 |
|
684 |
create index ConstructionLink_Index1 |
685 |
on constructionlink(ConstructionCode);
|
686 |
|
687 |
create index ConstructionLink_Index2 |
688 |
on constructionlink(FluctuationCode);
|
689 |
|
690 |
create index ConstructionLink_Index3 |
691 |
on constructionlink(LinkType);
|
692 |
|
693 |
-- ?H????????
|
694 |
drop table if exists constructionmaterialinfo cascade; |
695 |
|
696 |
create table constructionmaterialinfo ( |
697 |
CONSTRUCTIONCODE int(10) unsigned default 0 not null comment '?H?????' |
698 |
, MATERIALITEMCODE smallint(5) unsigned default 0 not null comment '????i??R?[?h' |
699 |
, PROCESSDATE datetime default '0000-00-00 00:00:00' not null comment '?????N????' |
700 |
, RENTCOUNT smallint(5) unsigned comment '??o??' |
701 |
, REPAYCOUNT smallint(5) unsigned comment '??p??' |
702 |
, JUNKCOUNT smallint(5) unsigned comment '?j????' |
703 |
, COMPLETEFLG tinyint(3) unsigned comment '?????t???O' |
704 |
, ENTRYDATE datetime comment '?o?^???t' |
705 |
, UPDATEDATE datetime comment '?X?V???t' |
706 |
, constraint constructionmaterialinfo_PKC primary key (CONSTRUCTIONCODE,MATERIALITEMCODE,PROCESSDATE) |
707 |
) comment '?H????????' ; |
708 |
|
709 |
-- ????i?????t?f?[?^
|
710 |
drop table if exists constructionprogressdate cascade; |
711 |
|
712 |
create table constructionprogressdate ( |
713 |
ConstructionCode decimal(10,0) not null comment '?H?????' |
714 |
, ConstructionStatusFlg decimal(2,0) not null comment '???H?????' |
715 |
, PreviousStatusFlg decimal(2,0) comment '??X?O???' |
716 |
, ChangeDate datetime not null comment '?????t' |
717 |
, ChangePersonCode decimal(8,0) not null comment '???S????' |
718 |
, EntryDate datetime not null comment '?o?^???t' |
719 |
, UpdateDate datetime not null comment '?X?V???t' |
720 |
, constraint constructionprogressdate_PKC primary key (ConstructionCode,ConstructionStatusFlg) |
721 |
) comment '????i?????t?f?[?^' ; |
722 |
|
723 |
-- ???}?X?^
|
724 |
drop table if exists constructionspecmaster cascade; |
725 |
|
726 |
create table constructionspecmaster ( |
727 |
ItemCode decimal(5,0) unsigned not null comment '?H??L?[' |
728 |
, SpecCode decimal(5,0) unsigned not null comment '???L?[' |
729 |
, DisplayOrder decimal(5,0) unsigned not null comment '?\????' |
730 |
, ItemName varchar(120) comment '??????' |
731 |
, SpecName varchar(120) comment '??????' |
732 |
, UnitName varchar(30) comment '?P?????' |
733 |
, UnitPrice decimal(9,2) not null comment '?P??' |
734 |
, DeleteFlg decimal(1,0) not null comment '???t???O' |
735 |
, EntryDate datetime not null comment '?o?^???t' |
736 |
, UpdateDate datetime not null comment '?X?V???t' |
737 |
, constraint constructionspecmaster_PKC primary key (ItemCode,SpecCode) |
738 |
) comment '???}?X?^' ; |
739 |
|
740 |
create index ConstructionSpecMaster_Index1 |
741 |
on constructionspecmaster(DisplayOrder);
|
742 |
|
743 |
-- ???P???}?X?^
|
744 |
drop table if exists constructionspecunitprice cascade; |
745 |
|
746 |
create table constructionspecunitprice ( |
747 |
ComponentCode decimal(5,0) unsigned not null comment '?\???L?[' |
748 |
, ItemCode decimal(5,0) unsigned not null comment '?H??L?[' |
749 |
, SpecCode decimal(5,0) unsigned not null comment '???L?[' |
750 |
, ConstructionTypeCode mediumint(8) unsigned not null comment '?H?????R?[?h' |
751 |
, UnitPrice decimal(9,2) not null comment '?P??' |
752 |
, EntryDate datetime not null comment '?o?^???t' |
753 |
, UpdateDate datetime not null comment '?X?V???t' |
754 |
, constraint constructionspecunitprice_PKC primary key (ComponentCode,ItemCode,SpecCode,ConstructionTypeCode) |
755 |
) comment '???P???}?X?^' ; |
756 |
|
757 |
-- ?H?????}?X?^
|
758 |
drop table if exists constructiontypemaster cascade; |
759 |
|
760 |
create table constructiontypemaster ( |
761 |
TypeCode decimal(5,0) unsigned not null comment '?H?????R?[?h' |
762 |
, DisplayOrder decimal(5,0) unsigned not null comment '?\????' |
763 |
, NameString varchar(100) not null comment '????' |
764 |
, PublicFlg decimal(1,0) not null comment '?H?????t???O' |
765 |
, SecRank decimal(1,0) not null comment '?????????N' |
766 |
, ExpensesLink decimal(1,0) not null comment '?o??g?p??' |
767 |
, DeleteFlg decimal(1,0) not null comment '???t???O' |
768 |
, EntryDate datetime not null comment '?o?^???t' |
769 |
, UpdateDate datetime not null comment '?X?V???t' |
770 |
, constraint constructiontypemaster_PKC primary key (TypeCode) |
771 |
) comment '?H?????}?X?^' ; |
772 |
|
773 |
-- ?S??????o??f?[?^
|
774 |
drop table if exists costdataofperson cascade; |
775 |
|
776 |
create table costdataofperson ( |
777 |
PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h' |
778 |
, ActionDate date not null comment '?????t' |
779 |
, DataType decimal(1,0) not null comment '?f?[?^??' |
780 |
, DataAddCount decimal(5,0) unsigned not null comment '?f?[?^??????' |
781 |
, TargetMonth varchar(7) not null comment '???N??' |
782 |
, ConstructionCode decimal(10,0) unsigned comment '?H???R?[?h' |
783 |
, SuppliersCode decimal(5,0) unsigned not null comment '?x????R?[?h' |
784 |
, SuppliersName varchar(120) comment '?x??????' |
785 |
, PaymentContent varchar(60) comment '?x?????e' |
786 |
, PaymentType decimal(1,0) not null comment '?x?????@?t???O' |
787 |
, EntryPrice decimal(12,0) not null comment '???z?i????j' |
788 |
, EntryPriceInTax decimal(12,0) not null comment '???z?i????j' |
789 |
, SlipNumber varchar(12) comment '?`?[???' |
790 |
, ComplateFlg decimal(1,0) not null comment '???????t???O' |
791 |
, ApprovalFlg decimal(1,0) not null comment '???F?t???O' |
792 |
, EntryDate datetime not null comment '?o?^???t' |
793 |
, UpdateDate datetime not null comment '?X?V???t' |
794 |
, constraint costdataofperson_PKC primary key (PersonCode,ActionDate,DataType,DataAddCount) |
795 |
) comment '?S??????o??f?[?^' ; |
796 |
|
797 |
create index CostDataOfPerson_Index1 |
798 |
on costdataofperson(TargetMonth);
|
799 |
|
800 |
create index CostDataOfPerson_Index2 |
801 |
on costdataofperson(ConstructionCode);
|
802 |
|
803 |
-- ??????o?^?\???f?[?^
|
804 |
drop table if exists costomerregist cascade; |
805 |
|
806 |
create table costomerregist ( |
807 |
PersonCode decimal(8,0) unsigned not null comment '?\??????' |
808 |
, CreateDate date not null comment '????' |
809 |
, SeqNo decimal(2,0) not null comment '?L?[?A??' |
810 |
, DataMode decimal(1,0) not null comment '?f?[?^??' |
811 |
, SourceCotegory decimal(5,0) unsigned not null comment '???????' |
812 |
, SourceCode decimal(5,0) unsigned not null comment '??????R?[?h' |
813 |
, PetitionPeriod decimal(4,0) unsigned not null comment '?????' |
814 |
, OrderFlg decimal(1,0) not null comment '?@?l?c??E??l?t???O' |
815 |
, CorporateStatusName varchar(100) comment '?@?l?i????' |
816 |
, CorporateStatusPoint decimal(1,0) comment '?@?l?i?????u' |
817 |
, OrderersName1 varchar(60) not null comment '???????1' |
818 |
, OrderersName2 varchar(60) comment '????????Q' |
819 |
, DepartmentName varchar(60) comment '??????' |
820 |
, ChargePersonName varchar(60) comment '?S?????' |
821 |
, ZipCode varchar(8) comment '?X????' |
822 |
, Address1 varchar(60) comment '?Z???P' |
823 |
, Address2 varchar(60) comment '?Z??2' |
824 |
, Address3 varchar(60) comment '?Z??3' |
825 |
, PhoneNumber varchar(13) comment '?d?b???' |
826 |
, FaxNumber varchar(13) comment 'FAX???' |
827 |
, MailAddress varchar(257) comment '???[???A?h???X' |
828 |
, Note varchar(300) comment '???l' |
829 |
, OrderCotegory decimal(5,0) unsigned not null comment '???????' |
830 |
, OrderDate date not null comment '?\????' |
831 |
, OrderNo decimal(2,0) unsigned not null comment '?\????t???' |
832 |
, EntryDate datetime not null comment '?o?^???t' |
833 |
, UpdateDate datetime not null comment '?X?V???t' |
834 |
, constraint costomerregist_PKC primary key (PersonCode,CreateDate,SeqNo) |
835 |
) comment '??????o?^?\???f?[?^' ; |
836 |
|
837 |
create index CostomerRegist_Index1 |
838 |
on costomerregist(PetitionPeriod);
|
839 |
|
840 |
-- ????f?[?^
|
841 |
drop table if exists dailydataconstruction cascade; |
842 |
|
843 |
create table dailydataconstruction ( |
844 |
PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h' |
845 |
, DailyDataDate date not null comment '???????' |
846 |
, ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
847 |
, Weather varchar(60) comment '?V?C' |
848 |
, EntryDate datetime not null comment '?o?^???t' |
849 |
, UpdateDate datetime not null comment '?X?V???t' |
850 |
, constraint dailydataconstruction_PKC primary key (PersonCode,DailyDataDate,ConstructionCode) |
851 |
) comment '????f?[?^' ; |
852 |
|
853 |
create index DailyDataConstruction_Index1 |
854 |
on dailydataconstruction(PersonCode);
|
855 |
|
856 |
create index DailyDataConstruction_Index2 |
857 |
on dailydataconstruction(DailyDataDate);
|
858 |
|
859 |
create index DailyDataConstruction_Index3 |
860 |
on dailydataconstruction(ConstructionCode);
|
861 |
|
862 |
-- ????f?[?^ (????)
|
863 |
drop table if exists dailydatadetail cascade; |
864 |
|
865 |
create table dailydatadetail ( |
866 |
PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h' |
867 |
, DailyDataDate date not null comment '???????' |
868 |
, ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
869 |
, SeqNo decimal(3,0) unsigned not null comment '????s???' |
870 |
, JobCategoryCode decimal(5,0) not null comment '?E??L?[' |
871 |
, CompanyCode decimal(8,0) not null comment '??????R?[?h' |
872 |
, TodayHeadCount decimal(4,1) not null comment '?????l????' |
873 |
, TotalHeadCount decimal(5,1) not null comment '??v?l????' |
874 |
, TodayWork varchar(100) comment '?????????e' |
875 |
, NextdayWork varchar(100) comment '?????????e' |
876 |
, NextdayHeadCount decimal(4,1) not null comment '?????l????' |
877 |
, EntryDate datetime not null comment '?o?^???t' |
878 |
, UpdateDate datetime not null comment '?X?V???t' |
879 |
, constraint dailydatadetail_PKC primary key (PersonCode,DailyDataDate,ConstructionCode,SeqNo) |
880 |
) comment '????f?[?^ (????)' ; |
881 |
|
882 |
create index DailyDataDetail_Index |
883 |
on dailydatadetail(PersonCode,DailyDataDate,ConstructionCode);
|
884 |
|
885 |
-- ????f?[?^ (??????)
|
886 |
drop table if exists dailydatafield cascade; |
887 |
|
888 |
create table dailydatafield ( |
889 |
PersonCode decimal(8,0) unsigned not null comment '????R?[?h' |
890 |
, DailyDataDate date not null comment '???????' |
891 |
, ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
892 |
, SeqNo decimal(3,0) unsigned not null comment '????s???' |
893 |
, PatrolTime datetime not null comment '?????' |
894 |
, ContentsText varchar(200) comment '???e' |
895 |
, EntryDate datetime not null comment '?o?^???t' |
896 |
, UpdateDate datetime not null comment '?X?V???t' |
897 |
, constraint dailydatafield_PKC primary key (PersonCode,DailyDataDate,ConstructionCode,SeqNo) |
898 |
) comment '????f?[?^ (??????)' ; |
899 |
|
900 |
create index DailyDataField_Index |
901 |
on dailydatafield(PersonCode,DailyDataDate,ConstructionCode);
|
902 |
|
903 |
-- ????f?[?^ (????)
|
904 |
drop table if exists dailydatamaterials cascade; |
905 |
|
906 |
create table dailydatamaterials ( |
907 |
PersonCode decimal(8,0) unsigned not null comment '????R?[?h' |
908 |
, DailyDataDate date not null comment '???????' |
909 |
, ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
910 |
, SeqNo decimal(3,0) unsigned not null comment '????s???' |
911 |
, Materials varchar(100) comment '?????' |
912 |
, Quantity varchar(100) comment '????' |
913 |
, Production varchar(100) comment '??????' |
914 |
, Delivery varchar(100) comment '?[?????' |
915 |
, QualityControl varchar(100) comment '?i?????????' |
916 |
, EntryDate datetime not null comment '?o?^???t' |
917 |
, UpdateDate datetime not null comment '?X?V???t' |
918 |
, constraint dailydatamaterials_PKC primary key (PersonCode,DailyDataDate,ConstructionCode,SeqNo) |
919 |
) comment '????f?[?^ (????)' ; |
920 |
|
921 |
create index DailyDataMaterials_Index |
922 |
on dailydatamaterials(PersonCode,DailyDataDate,ConstructionCode);
|
923 |
|
924 |
-- ????f?[?^ (??????w??)
|
925 |
drop table if exists dailydatasubcontractors cascade; |
926 |
|
927 |
create table dailydatasubcontractors ( |
928 |
PersonCode decimal(8,0) unsigned not null comment '????R?[?h' |
929 |
, DailyDataDate date not null comment '???????' |
930 |
, ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
931 |
, SeqNo decimal(3,0) unsigned not null comment '????s???' |
932 |
, Attendee varchar(100) comment '?o???' |
933 |
, ContentsText varchar(200) comment '???e' |
934 |
, EntryDate datetime not null comment '?o?^???t' |
935 |
, UpdateDate datetime not null comment '?X?V???t' |
936 |
, constraint dailydatasubcontractors_PKC primary key (PersonCode,DailyDataDate,ConstructionCode,SeqNo) |
937 |
) comment '????f?[?^ (??????w??)' ; |
938 |
|
939 |
create index DailyDataSubcontractors_Index |
940 |
on dailydatasubcontractors(PersonCode,DailyDataDate,ConstructionCode);
|
941 |
|
942 |
-- ????f?[?^ (???)
|
943 |
drop table if exists dailydatavehicles cascade; |
944 |
|
945 |
create table dailydatavehicles ( |
946 |
PersonCode decimal(8,0) unsigned not null comment '????R?[?h' |
947 |
, DailyDataDate date not null comment '???????' |
948 |
, ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
949 |
, SeqNo decimal(3,0) unsigned not null comment '????s???' |
950 |
, Model varchar(100) comment '?@??' |
951 |
, Performance varchar(100) comment '???\' |
952 |
, Owner varchar(100) comment '???L???' |
953 |
, Driver varchar(100) comment '?????^?]??' |
954 |
, StartWorkingTime datetime not null comment '??????J?n' |
955 |
, EndWorkingTime datetime not null comment '??????I??' |
956 |
, EntryDate datetime not null comment '?o?^???t' |
957 |
, UpdateDate datetime not null comment '?X?V???t' |
958 |
, constraint dailydatavehicles_PKC primary key (PersonCode,DailyDataDate,ConstructionCode,SeqNo)
|
959 |
) comment '????f?[?^ (???)' ; |
960 |
|
961 |
create index DailyDataVehicles_Index
|
962 |
on dailydatavehicles(PersonCode,DailyDataDate,ConstructionCode);
|
963 |
|
964 |
-- ???}?X?^
|
965 |
drop table if exists daymaster cascade;
|
966 |
|
967 |
create table daymaster (
|
968 |
days smallint(6) not null comment '??' |
969 |
) comment '???}?X?^' ; |
970 |
|
971 |
create index day_Index1
|
972 |
on daymaster(days);
|
973 |
|
974 |
-- ?????}?X?^
|
975 |
drop table if exists deadlinemaster cascade;
|
976 |
|
977 |
create table deadlinemaster (
|
978 |
LABOURKIND decimal(1,0) default '0' not null comment '??????' |
979 |
, DEADLINE decimal(2,0) comment '????' |
980 |
, PAYDAY decimal(2,0) comment '?x????' |
981 |
, NOTE varchar(120) comment '???l' |
982 |
, DELETEFLG decimal(1,0) comment '???t???O' |
983 |
, ENTRYDATE datetime comment '?o?^???t' |
984 |
, UPDATEDATE datetime comment '?X?V???t' |
985 |
, constraint deadlinemaster_PKC primary key (LABOURKIND)
|
986 |
) comment '?????}?X?^' ; |
987 |
|
988 |
-- ?????o???}?X?^
|
989 |
drop table if exists departmentexpensesmaster cascade;
|
990 |
|
991 |
create table departmentexpensesmaster (
|
992 |
DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h' |
993 |
, ExpensesPeriod smallint(6) not null comment '?????' |
994 |
, NameCode decimal(5,0) unsigned not null comment '?o????R?[?h' |
995 |
, DisplayOrder decimal(5,0) unsigned not null comment '?\????' |
996 |
, ExpensesRaito decimal(4,2) not null comment '?o??' |
997 |
, DeleteFlg decimal(1,0) not null comment '???t???O' |
998 |
, EntryDate datetime not null comment '?o?^???t' |
999 |
, UpdateDate datetime not null comment '?X?V???t' |
1000 |
, constraint departmentexpensesmaster_PKC primary key (DepartmentCode,ExpensesPeriod,NameCode)
|
1001 |
) comment '?????o???}?X?^' ; |
1002 |
|
1003 |
-- ?????}?X?^
|
1004 |
drop table if exists departmentmaster cascade;
|
1005 |
|
1006 |
create table departmentmaster (
|
1007 |
DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h' |
1008 |
, DisplayOrder decimal(5,0) unsigned not null comment '?\????' |
1009 |
, DepartmentString varchar(100) not null comment '??????' |
1010 |
, ActionScheduleFlg decimal(1,0) not null comment '?s???\??\???t???O' |
1011 |
, StaffAssignFlg decimal(1,0) not null comment '?l???z?u?\???t???O' |
1012 |
, DeleteFlg decimal(1,0) not null comment '???t???O' |
1013 |
, EntryDate datetime not null comment '?o?^???t' |
1014 |
, UpdateDate datetime not null comment '?X?V???t' |
1015 |
, constraint departmentmaster_PKC primary key (DepartmentCode)
|
1016 |
) comment '?????}?X?^' ; |
1017 |
|
1018 |
create index DepartmentMaster_index1
|
1019 |
on departmentmaster(DisplayOrder);
|
1020 |
|
1021 |
-- ?????m?F???F?f?[?^
|
1022 |
drop table if exists depositapprovalinfo cascade;
|
1023 |
|
1024 |
create table depositapprovalinfo (
|
1025 |
ORDERERSDIVISION decimal(5,0) not null comment '???????' |
1026 |
, ORDERERSCODE decimal(5,0) not null comment '??????R?[?h' |
1027 |
, TARGETDATE decimal(6,0) not null comment '???N??' |
1028 |
, SEQNO decimal(3,0) not null comment '?A??' |
1029 |
, LINECOUNT decimal(3,0) not null comment '?s???' |
1030 |
, APPROVALNO decimal(3,0) not null comment '???F????' |
1031 |
, APPROVALPERSON decimal(8,0) comment '???F??R?[?h' |
1032 |
, APPROVALPERSONNAME varchar(20) comment '???F???' |
1033 |
, APPROVALAUTHORITY decimal(1,0) comment '???F??????' |
1034 |
, APPROVALDATE date comment '???F???t' |
1035 |
, ENTRYDATE datetime comment '?o?^???t' |
1036 |
, UPDATEDATE datetime comment '?X?V???t' |
1037 |
, constraint depositapprovalinfo_PKC primary key (ORDERERSDIVISION,ORDERERSCODE,TARGETDATE,SEQNO,LINECOUNT,APPROVALNO)
|
1038 |
) comment '?????m?F???F?f?[?^' ; |
1039 |
|
1040 |
-- ?????f?[?^
|
1041 |
drop table if exists depositdata cascade;
|
1042 |
|
1043 |
create table depositdata (
|
1044 |
ORDERERSDIVISION decimal(5,0) not null comment '???????' |
1045 |
, ORDERERSCODE decimal(5,0) not null comment '??????R?[?h' |
1046 |
, TARGETDATE decimal(6,0) not null comment '???N??' |
1047 |
, SEQNO decimal(3,0) not null comment '?A??' |
1048 |
, BUSINESSPERIOD decimal(4,0) comment '?c???' |
1049 |
, DEPOSITDATE date comment '??????' |
1050 |
, DEPOSITAMOUNT decimal(12,0) comment '???????z' |
1051 |
, DEPOSITAMOUNTCASH decimal(10,0) comment '???????z?i?????j' |
1052 |
, DEPOSITAMOUNTBILL decimal(10,0) comment '???????z?i??`?j' |
1053 |
, DEPOSITPERSONCODE decimal(8,0) not null comment '?????S????R?[?h'
|
1054 |
, NOTE varchar(120) comment '???l'
|
1055 |
, ENTRYDATE datetime comment '?o?^???t'
|
1056 |
, UPDATEDATE datetime comment '?X?V???t'
|
1057 |
, constraint depositdata_PKC primary key (ORDERERSDIVISION,ORDERERSCODE,TARGETDATE,SEQNO)
|
1058 |
) comment '?????f?[?^' ;
|
1059 |
|
1060 |
-- ????????f?[?^
|
1061 |
drop table if exists depositdatadetail cascade;
|
1062 |
|
1063 |
create table depositdatadetail (
|
1064 |
ORDERERSDIVISION decimal(5,0) not null comment '???????'
|
1065 |
, ORDERERSCODE decimal(5,0) not null comment '??????R?[?h'
|
1066 |
, TARGETDATE decimal(6,0) not null comment '???N??'
|
1067 |
, REQUESTNO decimal(10,0) not null comment '????No'
|
1068 |
, ORDERNO decimal(2,0) comment '??t???'
|
1069 |
, DEPOSITAMOUNT decimal(10,0) comment '???????z'
|
1070 |
, DISCOUNTAMOUNT decimal(10,0) comment '?l???????z'
|
1071 |
, CNSTRPRICE decimal(10,0) comment '?????'
|
1072 |
, FEES decimal(10,0) comment '????'
|
1073 |
, OTHERADJUSTMENTS decimal(10,0) comment '?????'
|
1074 |
, DIFFERENCEAMOUNT decimal(10,0) comment '????'
|
1075 |
, CONFIRMATIONPERSONCODE decimal(8,0) comment '?m?F?S????R?[?h'
|
1076 |
, CONFIRMATIONDATE date comment '?S????m?F???t'
|
1077 |
, CONFIRMATIONENDFLG decimal(1,0) comment '?m?F?????t???O'
|
1078 |
, NOTE varchar(120) comment '???l'
|
1079 |
, ENTRYDATE datetime comment '?o?^???t'
|
1080 |
, UPDATEDATE datetime comment '?X?V???t'
|
1081 |
, constraint depositdatadetail_PKC primary key (ORDERERSDIVISION,ORDERERSCODE,TARGETDATE,REQUESTNO)
|
1082 |
) comment '????????f?[?^' ;
|
1083 |
|
1084 |
-- ???}?X?^
|
1085 |
drop table if exists divisionmaster cascade;
|
1086 |
|
1087 |
create table divisionmaster (
|
1088 |
DivisionCode decimal(5,0) unsigned not null comment '???R?[?h'
|
1089 |
, NameCode decimal(5,0) unsigned not null comment '????R?[?h'
|
1090 |
, DisplayOrder decimal(5,0) unsigned not null comment '?\????'
|
1091 |
, NameString varchar(100) not null comment '????'
|
1092 |
, DeleteFlg decimal(1,0) not null comment '???t???O'
|
1093 |
, EntryDate datetime not null comment '?o?^???t'
|
1094 |
, UpdateDate datetime not null comment '?X?V???t'
|
1095 |
, constraint divisionmaster_PKC primary key (DivisionCode,NameCode)
|
1096 |
) comment '???}?X?^' ;
|
1097 |
|
1098 |
-- ??Z?\?Z???f?[?^
|
1099 |
drop table if exists estimatebudget cascade;
|
1100 |
|
1101 |
create table estimatebudget (
|
1102 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
|
1103 |
, ConstructionTime decimal(5,2) unsigned not null comment '?H??'
|
1104 |
, IntegratedCode decimal(8,0) not null comment '??Z??'
|
1105 |
, DataCreateDate datetime not null comment '?f?[?^??????'
|
1106 |
, RetValue1 decimal(12,0) not null comment '?\???i'
|
1107 |
, RetValue2 decimal(12,0) not null comment '????H????'
|
1108 |
, RetValue3 decimal(12,0) not null comment '????????????'
|
1109 |
, RetValue4 decimal(12,0) not null comment '????????????'
|
1110 |
, RetPercent decimal(5,2) not null comment '???????'
|
1111 |
, EntryDate datetime not null comment '?o?^???t'
|
1112 |
, UpdateDate datetime not null comment '?X?V???t'
|
1113 |
, constraint estimatebudget_PKC primary key (ConstructionCode)
|
1114 |
) comment '??Z?\?Z???f?[?^' ;
|
1115 |
|
1116 |
-- ??Z?\?Z????f?[?^????
|
1117 |
drop table if exists estimatebudgetdetail cascade;
|
1118 |
|
1119 |
create table estimatebudgetdetail (
|
1120 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
|
1121 |
, GroupCount decimal(2,0) unsigned not null comment '?O???[?v???'
|
1122 |
, LineCount decimal(3,0) unsigned not null comment '?s???'
|
1123 |
, ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
|
1124 |
, ItemCode decimal(5,0) unsigned comment '?H??L?['
|
1125 |
, CompanyCode decimal(8,0) not null comment '??????R?[?h'
|
1126 |
, FirstString varchar(120) comment '???????'
|
1127 |
, SecondString varchar(120) comment '?H????E???????'
|
1128 |
, Content varchar(120) comment '???e'
|
1129 |
, EstimatePrice decimal(12,0) not null comment '????????z'
|
1130 |
, NegotiationPrice decimal(12,0) not null comment '????????z'
|
1131 |
, Notes varchar(120) comment '???????'
|
1132 |
, EntryDate datetime not null comment '?o?^???t'
|
1133 |
, UpdateDate datetime not null comment '?X?V???t'
|
1134 |
, constraint estimatebudgetdetail_PKC primary key (ConstructionCode,GroupCount,LineCount)
|
1135 |
) comment '??Z?\?Z????f?[?^????' ;
|
1136 |
|
1137 |
-- ??Z????f?[?^
|
1138 |
drop table if exists estimatedata cascade;
|
1139 |
|
1140 |
create table estimatedata (
|
1141 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
|
1142 |
, LineCount decimal(3,0) unsigned not null comment '?s???'
|
1143 |
, ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
|
1144 |
, FixedItemCode varchar(1) comment '?????L?['
|
1145 |
, ItemName varchar(120) comment '??????'
|
1146 |
, SpecName varchar(120) comment '???^?i???E?`??E???@' |
1147 |
, PriceValue decimal(14,0) not null comment '???z' |
1148 |
, note varchar(60) comment '???l' |
1149 |
, MyExpensesFlg decimal(1,0) not null comment '????o??t???O' |
1150 |
, InputFlg decimal(1,0) not null comment '????t???O' |
1151 |
, EntryDate datetime not null comment '?o?^???t' |
1152 |
, UpdateDate datetime not null comment '?X?V???t' |
1153 |
, constraint estimatedata_PKC primary key (ConstructionCode,LineCount)
|
1154 |
) comment '??Z????f?[?^' ; |
1155 |
|
1156 |
create index EstimateData_Index1
|
1157 |
on estimatedata(ConstructionCode,FixedItemCode);
|
1158 |
|
1159 |
-- ??Z????y?[?W?f?[?^
|
1160 |
drop table if exists estimatedatabody cascade;
|
1161 |
|
1162 |
create table estimatedatabody (
|
1163 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
1164 |
, PageCount decimal(4,0) unsigned not null comment '?y?[?W???' |
1165 |
, Category decimal(1,0) not null comment '?y?[?W??' |
1166 |
, UnionComponentCode decimal(5,0) unsigned not null comment '?????\???L?[' |
1167 |
, ComponentCode decimal(5,0) unsigned not null comment '?\???L?[' |
1168 |
, ItemCode decimal(5,0) unsigned not null comment '?H??L?[' |
1169 |
, SelectComponent decimal(5,0) unsigned not null comment '?I???\???L?[' |
1170 |
, PageTitle varchar(120) not null comment '?y?[?W?\????' |
1171 |
, DetailLineCount decimal(3,0) unsigned not null comment '????s???' |
1172 |
, EntryDate datetime not null comment '?o?^???t' |
1173 |
, UpdateDate datetime not null comment '?X?V???t' |
1174 |
, constraint estimatedatabody_PKC primary key (ConstructionCode,PageCount)
|
1175 |
) comment '??Z????y?[?W?f?[?^' ; |
1176 |
|
1177 |
create index EstimateDataBody_Index1
|
1178 |
on estimatedatabody(ConstructionCode,ComponentCode,ItemCode);
|
1179 |
|
1180 |
-- ??Z????f?[?^????
|
1181 |
drop table if exists estimatedatadetail cascade;
|
1182 |
|
1183 |
create table estimatedatadetail (
|
1184 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
1185 |
, PageCount decimal(4,0) unsigned not null comment '?y?[?W???' |
1186 |
, LineCount decimal(3,0) unsigned not null comment '?s???' |
1187 |
, DataType decimal(1,0) not null comment '?f?[?^???' |
1188 |
, ComponentCode decimal(5,0) unsigned not null comment '?\???L?[' |
1189 |
, ItemCode decimal(5,0) unsigned not null comment '?H??L?[' |
1190 |
, SpecCode decimal(5,0) unsigned not null comment '???L?[' |
1191 |
, ItemName varchar(120) comment '??????' |
1192 |
, SpecName varchar(120) comment '???^?i???E?`??E???@' |
1193 |
, Unitcount decimal(8,2) not null comment '????'
|
1194 |
, UnitName varchar(30) comment '?P?????'
|
1195 |
, UnitPrice decimal(9,2) not null comment '?P??'
|
1196 |
, LineTotal decimal(12,0) not null comment '???z'
|
1197 |
, note varchar(60) comment '???l'
|
1198 |
, CompanyCode decimal(8,0) not null comment '??????R?[?h'
|
1199 |
, MyExpensesFlg decimal(1,0) not null comment '????o??t???O'
|
1200 |
, InputFlg decimal(1,0) comment '????t???O'
|
1201 |
, EntryDate datetime not null comment '?o?^???t'
|
1202 |
, UpdateDate datetime not null comment '?X?V???t'
|
1203 |
, constraint estimatedatadetail_PKC primary key (ConstructionCode,PageCount,LineCount)
|
1204 |
) comment '??Z????f?[?^????' ;
|
1205 |
|
1206 |
create index EstimateDataDetail_Index1
|
1207 |
on estimatedatadetail(ConstructionCode,PageCount);
|
1208 |
|
1209 |
-- ?o???}?X?^
|
1210 |
drop table if exists expensesmaster cascade;
|
1211 |
|
1212 |
create table expensesmaster (
|
1213 |
DivisionCode smallint(6) not null comment '?H?????R?[?h'
|
1214 |
, NameCode smallint(6) not null comment '?o????R?[?h'
|
1215 |
, DisplayOrder smallint(6) not null comment '?\????'
|
1216 |
, ExpensesRatio decimal(4,2) not null comment '?o??'
|
1217 |
, DeleteFlg decimal(1,0) not null comment '???t???O'
|
1218 |
, EntryDate datetime not null comment '?o?^???t'
|
1219 |
, UpdateDate datetime not null comment '?X?V???t'
|
1220 |
, constraint expensesmaster_PKC primary key (DivisionCode,NameCode)
|
1221 |
) comment '?o???}?X?^' ;
|
1222 |
|
1223 |
-- ???x???}?X?^
|
1224 |
drop table if exists holidaycalendermaster cascade;
|
1225 |
|
1226 |
create table holidaycalendermaster (
|
1227 |
Holiday date not null comment '?x??'
|
1228 |
, BusinessYear smallint(5) unsigned not null comment '?c??N?x'
|
1229 |
, TargetMonth tinyint(3) unsigned not null comment '?Y????'
|
1230 |
, TargetDay tinyint(3) unsigned not null comment '?Y????'
|
1231 |
, constraint holidaycalendermaster_PKC primary key (Holiday)
|
1232 |
) comment '???x???}?X?^' ;
|
1233 |
|
1234 |
create index HolidayCalender_Index1
|
1235 |
on holidaycalendermaster(BusinessYear);
|
1236 |
|
1237 |
create index HolidayCalenderMaster_Index2
|
1238 |
on holidaycalendermaster(TargetMonth);
|
1239 |
|
1240 |
create index HolidayCalenderMaster_Index3
|
1241 |
on holidaycalendermaster(TargetDay);
|
1242 |
|
1243 |
-- ?????????????
|
1244 |
drop table if exists inputsearchlogdata cascade;
|
1245 |
|
1246 |
create table inputsearchlogdata (
|
1247 |
ConstructionCode decimal(10,0) not null comment '?H???R?[?h'
|
1248 |
, UsedProcessNo decimal(4,0) not null comment '?g?p?@?\???'
|
1249 |
, DisplayOrder decimal(4,0) unsigned not null comment '?\????'
|
1250 |
, DataType decimal(1,0) not null comment '?f?[?^???'
|
1251 |
, InputCode decimal(10,0) comment '????R?[?h'
|
1252 |
, constraint inputsearchlogdata_PKC primary key (ConstructionCode,UsedProcessNo,DisplayOrder)
|
1253 |
) comment '?????????????' ;
|
1254 |
|
1255 |
create index InputSearchLogData_Index1
|
1256 |
on inputsearchlogdata(ConstructionCode,UsedProcessNo,InputCode);
|
1257 |
|
1258 |
-- ???????f?[?^
|
1259 |
drop table if exists invoicedata cascade;
|
1260 |
|
1261 |
create table invoicedata (
|
1262 |
INVOICENO decimal(9,0) not null comment '??????No'
|
1263 |
, ORDERERSDIVISION decimal(5,0) not null comment '???????'
|
1264 |
, ORDERERSCODE decimal(5,0) not null comment '??????R?[?h'
|
1265 |
, REQUESTMONTH decimal(6,0) not null comment '??????'
|
1266 |
, SEQNO decimal(2,0) not null comment '?A??'
|
1267 |
, CRETATEDATE date not null comment '????'
|
1268 |
, REQUESTDATE date not null comment '??????'
|
1269 |
, REQUESTNAME varchar(120) comment '??????'
|
1270 |
, TOTALAMOUNT decimal(10,0) comment '???????v???z'
|
1271 |
, TAXAMOUNT decimal(10,0) comment '???????z'
|
1272 |
, COMMENT1 varchar(60) comment '?R?????g1'
|
1273 |
, COMMENT2 varchar(60) comment '?R?????g2'
|
1274 |
, COMMENT3 varchar(60) not null comment '?R?????g3'
|
1275 |
, COMMENT4 varchar(60) not null comment '?R?????g4'
|
1276 |
, COMMENT5 varchar(60) not null comment '?R?????g5'
|
1277 |
, COMPLETEFLG decimal(1,0) default '0' not null comment '?????t???O'
|
1278 |
, ENTRYDATE datetime not null comment '?o?^?N????'
|
1279 |
, UPDATEDATE datetime not null comment '?X?V?N????'
|
1280 |
, constraint invoicedata_PKC primary key (INVOICENO)
|
1281 |
) comment '???????f?[?^' ;
|
1282 |
|
1283 |
alter table invoicedata add unique ORDERERSDIVISION (ORDERERSDIVISION,ORDERERSCODE,REQUESTMONTH,SEQNO) ;
|
1284 |
|
1285 |
-- ??????
|
1286 |
drop table if exists materialinfo cascade;
|
1287 |
|
1288 |
create table materialinfo (
|
1289 |
MATERIALITEMCODE smallint(5) unsigned default 0 not null comment '????i??R?[?h'
|
1290 |
, MATERIALCOUNT smallint(5) unsigned comment '?????'
|
1291 |
, RENTCOUNT smallint(5) unsigned comment '??o??\??'
|
1292 |
, DELETEFLG smallint(5) unsigned comment '???t???O'
|
1293 |
, ENTRYDATE datetime comment '?o?^???t'
|
1294 |
, UPDATEDATE datetime comment '?X?V???t'
|
1295 |
, constraint materialinfo_PKC primary key (MATERIALITEMCODE)
|
1296 |
) comment '??????' ;
|
1297 |
|
1298 |
-- ????i??}?X?^
|
1299 |
drop table if exists materialitemmaster cascade;
|
1300 |
|
1301 |
create table materialitemmaster (
|
1302 |
MATERIALITEMCODE smallint(5) unsigned default 0 not null comment '????i??R?[?h'
|
1303 |
, MATERIALKINDCODE smallint(5) unsigned comment '??????R?[?h'
|
1304 |
, MATERIALITEMNAME varchar(40) comment '????i?????'
|
1305 |
, DISPLAYORDER smallint(5) unsigned comment '?\????'
|
1306 |
, DELETEFLG tinyint(3) unsigned comment '???t???O'
|
1307 |
, ENTRYDATE datetime comment '?o?^???t'
|
1308 |
, UPDATEDATE datetime comment '?X?V???t'
|
1309 |
, VERSIONNO decimal(8,0) default '0' not null comment '?o?[?W???????'
|
1310 |
, constraint materialitemmaster_PKC primary key (MATERIALITEMCODE)
|
1311 |
) comment '????i??}?X?^' ;
|
1312 |
|
1313 |
-- ??????}?X?^
|
1314 |
drop table if exists materialkindmaster cascade;
|
1315 |
|
1316 |
create table materialkindmaster (
|
1317 |
MATERIALKINDCODE smallint(5) unsigned default 0 not null comment '??????R?[?h'
|
1318 |
, MATERIALKINDNAME varchar(40) comment '?????????'
|
1319 |
, DISPLAYORDER smallint(5) unsigned comment '?\????'
|
1320 |
, DELETEFLG tinyint(3) unsigned comment '???t???O'
|
1321 |
, ENTRYDATE datetime comment '?o?^???t'
|
1322 |
, UPDATEDATE datetime comment '?X?V???t'
|
1323 |
, constraint materialkindmaster_PKC primary key (MATERIALKINDCODE)
|
1324 |
) comment '??????}?X?^' ;
|
1325 |
|
1326 |
-- ??????????
|
1327 |
drop table if exists materialrecordinfo cascade;
|
1328 |
|
1329 |
create table materialrecordinfo (
|
1330 |
MATERIALITEMCODE smallint(5) unsigned default 0 not null comment '????i??R?[?h'
|
1331 |
, PROCESSDATE date default '0000-00-00' not null comment '?????N????'
|
1332 |
, SEQNO smallint(5) unsigned default 0 not null comment '?A??'
|
1333 |
, RECKIND tinyint(3) unsigned comment '???R?[?h??'
|
1334 |
, CONSTRUCTIONCODE int(10) unsigned comment '?H?????'
|
1335 |
, PERSONCODE int(10) unsigned comment '?S????R?[?h'
|
1336 |
, MATERIALCOUNT smallint(5) unsigned comment '?????'
|
1337 |
, REPAYPLANDATE date comment '??p?\??N????'
|
1338 |
, COMMENTTEXT varchar(80) comment '?R?????g'
|
1339 |
, ENTRYDATE datetime comment '?o?^???t'
|
1340 |
, UPDATEDATE datetime comment '?X?V???t'
|
1341 |
, constraint materialrecordinfo_PKC primary key (MATERIALITEMCODE,PROCESSDATE,SEQNO)
|
1342 |
) comment '??????????' ;
|
1343 |
|
1344 |
-- ?f??????b?Z?[?W
|
1345 |
drop table if exists messageboarddata cascade;
|
1346 |
|
1347 |
create table messageboarddata (
|
1348 |
RecordNumber decimal(6,0) unsigned not null comment '???R?[?h???'
|
1349 |
, BranchNumber decimal(3,0) unsigned not null comment '???R?[?h?}??'
|
1350 |
, FromCode decimal(8,0) unsigned not null comment '???????R?[?h'
|
1351 |
, FromName varchar(60) not null comment '???????'
|
1352 |
, MessageTitile varchar(100) comment '?`???^?C?g??' |
1353 |
, MessageContent varchar(1333) not null comment '?`?????e' |
1354 |
, LinkType decimal(2,0) not null comment '?????N????^?C?v'
|
1355 |
, LinkMessage varchar(200) comment '?????N??????'
|
1356 |
, LinkCode varchar(30) comment '?????N?L?['
|
1357 |
, WritingDate datetime not null comment '?????????'
|
1358 |
, PersonCode decimal(8,0) not null comment '??????S????R?[?h'
|
1359 |
, ShareFlag decimal(2,0) not null comment '???????t???O'
|
1360 |
, MessageColor varchar(8) comment '?????F'
|
1361 |
, BackColor varchar(8) comment '?o?b?N?J???['
|
1362 |
, MessageFlag decimal(1,0) not null comment '???b?Z?[?W?t???O'
|
1363 |
, EntryDate datetime not null comment '?o?^???t'
|
1364 |
, UpdateDate datetime not null comment '?X?V???t'
|
1365 |
, constraint messageboarddata_PKC primary key (RecordNumber,BranchNumber)
|
1366 |
) comment '?f??????b?Z?[?W' ;
|
1367 |
|
1368 |
create index MessageBoardData_Index1
|
1369 |
on messageboarddata(WritingDate);
|
1370 |
|
1371 |
create index MessageBoardData_Index2
|
1372 |
on messageboarddata(MessageFlag);
|
1373 |
|
1374 |
-- ?f???????e?[?u??
|
1375 |
drop table if exists messageboardterget cascade;
|
1376 |
|
1377 |
create table messageboardterget (
|
1378 |
RecordNumber decimal(6,0) unsigned not null comment '???R?[?h???'
|
1379 |
, BranchNumber decimal(3,0) unsigned not null comment '???R?[?h?}??'
|
1380 |
, SeqNum decimal(3,0) unsigned not null comment '????'
|
1381 |
, ToCode decimal(8,0) not null comment '????R?[?h'
|
1382 |
, ToName varchar(60) not null comment '????'
|
1383 |
, EntryDate datetime not null comment '?o?^???t'
|
1384 |
, UpdateDate datetime not null comment '?X?V???t'
|
1385 |
, constraint messageboardterget_PKC primary key (RecordNumber,BranchNumber,SeqNum)
|
1386 |
) comment '?f???????e?[?u??' ;
|
1387 |
|
1388 |
create index MessageBoardTerget_Index1
|
1389 |
on messageboardterget(RecordNumber,BranchNumber);
|
1390 |
|
1391 |
-- ?f??????b?Z?[?W?{??????
|
1392 |
drop table if exists messagebrowsinghistory cascade;
|
1393 |
|
1394 |
create table messagebrowsinghistory (
|
1395 |
RecordNumber decimal(6,0) unsigned not null comment '???R?[?h???'
|
1396 |
, BranchNumber decimal(3,0) unsigned not null comment '???R?[?h?}??'
|
1397 |
, SeqNum decimal(3,0) unsigned not null comment '????'
|
1398 |
, BrowsingCode decimal(8,0) not null comment '?{????R?[?h'
|
1399 |
, BrowsingDate datetime not null comment '?{?????t'
|
1400 |
, EntryDate datetime not null comment '?o?^???t'
|
1401 |
, UpdateDate datetime not null comment '?X?V???t'
|
1402 |
, constraint messagebrowsinghistory_PKC primary key (RecordNumber,BranchNumber,SeqNum)
|
1403 |
) comment '?f??????b?Z?[?W?{??????' ;
|
1404 |
|
1405 |
-- ???}?X?^
|
1406 |
drop table if exists monthmaster cascade;
|
1407 |
|
1408 |
create table monthmaster (
|
1409 |
month smallint(6) not null comment '??'
|
1410 |
) comment '???}?X?^' ;
|
1411 |
|
1412 |
create index month_Index1
|
1413 |
on monthmaster(month);
|
1414 |
|
1415 |
-- ??????}?X?^
|
1416 |
drop table if exists orderersmaster cascade;
|
1417 |
|
1418 |
create table orderersmaster (
|
1419 |
OrderCotegory decimal(5,0) unsigned not null comment '???????'
|
1420 |
, OrderersCode decimal(5,0) unsigned not null comment '??????R?[?h'
|
1421 |
, DisplayOrder decimal(5,0) unsigned not null comment '?\????'
|
1422 |
, OrderFlg decimal(1,0) not null comment '?@?l?c??E??l?t???O'
|
1423 |
, CorporateStatusName varchar(100) comment '?@?l?i????'
|
1424 |
, CorporateStatusPoint decimal(1,0) comment '?@?l?i?????u'
|
1425 |
, OrderersName1 varchar(60) not null comment '???????1'
|
1426 |
, OrderersName2 varchar(60) comment '????????Q'
|
1427 |
, DepartmentName varchar(60) comment '??????'
|
1428 |
, ChargePersonName varchar(60) comment '?S?????'
|
1429 |
, ZipCode varchar(8) comment '?X????'
|
1430 |
, Address1 varchar(60) comment '?Z???P'
|
1431 |
, Address2 varchar(60) comment '?Z??2'
|
1432 |
, Address3 varchar(60) comment '?Z??3'
|
1433 |
, PhoneNumber varchar(13) comment '?d?b???'
|
1434 |
, FaxNumber varchar(13) comment 'FAX???'
|
1435 |
, MailAddress varchar(257) comment '???[???A?h???X'
|
1436 |
, Note varchar(300) comment '???l'
|
1437 |
, DeleteFlg decimal(1,0) not null comment '???t???O'
|
1438 |
, EntryDate datetime not null comment '?o?^???t'
|
1439 |
, UpdateDate datetime not null comment '?X?V???t'
|
1440 |
, constraint orderersmaster_PKC primary key (OrderCotegory,OrderersCode)
|
1441 |
) comment '??????}?X?^' ;
|
1442 |
|
1443 |
-- ????z?f?[?^
|
1444 |
drop table if exists orderspricedata cascade;
|
1445 |
|
1446 |
create table orderspricedata (
|
1447 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
|
1448 |
, ChangeNo decimal(3,0) unsigned not null comment '??X???'
|
1449 |
, ChangeDate date not null comment '??X??'
|
1450 |
, ChangePersonCode decimal(8,0) unsigned not null comment '??X??R?[?h'
|
1451 |
, ChangePersonName varchar(60) comment '??X???'
|
1452 |
, BeforeValue decimal(14,0) not null comment '??X?O???????z'
|
1453 |
, BeforeValueInTax decimal(14,0) not null comment '??X?O???????z'
|
1454 |
, AfterValue decimal(14,0) not null comment '??X????????z'
|
1455 |
, AfterValueInTax decimal(14,0) not null comment '??X????????z'
|
1456 |
, ChangeComment varchar(200) comment '??X???R'
|
1457 |
, EntryDate datetime not null comment '?o?^???t'
|
1458 |
, UpdateDate datetime not null comment '?X?V???t'
|
1459 |
, constraint orderspricedata_PKC primary key (ConstructionCode,ChangeNo)
|
1460 |
) comment '????z?f?[?^' ;
|
1461 |
|
1462 |
-- ?x?????F???f?[?^
|
1463 |
drop table if exists paymentapprovalinfo cascade;
|
1464 |
|
1465 |
create table paymentapprovalinfo (
|
1466 |
COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h'
|
1467 |
, TARGETDATE decimal(6,0) default '0' not null comment '???N??'
|
1468 |
, SEQNO decimal(3,0) default '0' not null comment '?A??'
|
1469 |
, LINECOUNT decimal(3,0) default '0' not null comment '?s???'
|
1470 |
, APPROVALNO decimal(3,0) default '0' not null comment '???F????'
|
1471 |
, APPROVALPERSON decimal(8,0) comment '???F??R?[?h'
|
1472 |
, APPROVALPERSONNAME varchar(20) comment '???F???'
|
1473 |
, APPROVALAUTHORITY decimal(1,0) comment '???F??????'
|
1474 |
, APPROVALDATE date comment '???F???t'
|
1475 |
, ENTRYDATE datetime comment '?o?^???t'
|
1476 |
, UPDATEDATE datetime comment '?X?V???t'
|
1477 |
, constraint paymentapprovalinfo_PKC primary key (COMPANYCODE,TARGETDATE,SEQNO,LINECOUNT,APPROVALNO)
|
1478 |
) comment '?x?????F???f?[?^' ;
|
1479 |
|
1480 |
-- ?x??????f?[?^
|
1481 |
drop table if exists paymentdatadetail cascade;
|
1482 |
|
1483 |
create table paymentdatadetail (
|
1484 |
COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h'
|
1485 |
, TARGETDATE decimal(6,0) default '0' not null comment '???N??'
|
1486 |
, SEQNO decimal(3,0) default '0' not null comment '?A??'
|
1487 |
, LINECOUNT decimal(3,0) default '0' not null comment '?s???'
|
1488 |
, BILLPRICE decimal(10,0) comment '???????z'
|
1489 |
, DISCOUNTPRICE decimal(10,0) comment '?l???????z'
|
1490 |
, OFFSETPRICE decimal(10,0) comment '???E???z'
|
1491 |
, NEXTCOPRICE decimal(10,0) comment '????J?z'
|
1492 |
, HIGHWPRICE decimal(10,0) comment '??????'
|
1493 |
, HARDWPRICE decimal(10,0) comment '??????'
|
1494 |
, INDSWASTETAX decimal(10,0) comment '?Y?p??'
|
1495 |
, CNSTRPRICE decimal(10,0) comment '?????'
|
1496 |
, CNSTRPRICEEXIST decimal(1,0) comment '??????L??'
|
1497 |
, APPROVALPERSONCODE decimal(8,0) comment '???F?S????R?[?h'
|
1498 |
, APPROVALDATE date comment '?S??????F???t'
|
1499 |
, APPROVALENDFLG decimal(1,0) comment '???F?????t???O'
|
1500 |
, ENTRYDATE datetime comment '?o?^???t'
|
1501 |
, UPDATEDATE datetime comment '?X?V???t'
|
1502 |
, constraint paymentdatadetail_PKC primary key (COMPANYCODE,TARGETDATE,SEQNO,LINECOUNT)
|
1503 |
) comment '?x??????f?[?^' ;
|
1504 |
|
1505 |
-- ?S??????F?f?[?^
|
1506 |
drop table if exists personapproval cascade;
|
1507 |
|
1508 |
create table personapproval (
|
1509 |
PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
|
1510 |
, ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???'
|
1511 |
, OrderDate date not null comment '??t??'
|
1512 |
, OrderNo decimal(2,0) unsigned not null comment '??t???'
|
1513 |
, SeqNo decimal(2,0) not null comment '?}??'
|
1514 |
, PersonCodeApproval decimal(8,0) unsigned not null comment '?\???E???F??R?[?h'
|
1515 |
, PetitionApprovalDate datetime not null comment '?\???E???F???t'
|
1516 |
, ApprovalLimitDates datetime not null comment '???F??]??'
|
1517 |
, ApprovalStatus decimal(1,0) not null comment '???F???'
|
1518 |
, InputComment varchar(300) comment '?R?????g'
|
1519 |
, EntryDate datetime not null comment '?o?^???t'
|
1520 |
, UpdateDate datetime not null comment '?X?V???t'
|
1521 |
, constraint personapproval_PKC primary key (PersonCode,ApprovalCode,OrderDate,OrderNo,SeqNo)
|
1522 |
) comment '?S??????F?f?[?^' ;
|
1523 |
|
1524 |
-- ?S??????F?R?????g?f?[?^
|
1525 |
drop table if exists personapprovalcomment cascade;
|
1526 |
|
1527 |
create table personapprovalcomment (
|
1528 |
PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
|
1529 |
, ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???'
|
1530 |
, OrderDate date not null comment '??t??'
|
1531 |
, OrderNo decimal(2,0) unsigned not null comment '??t???'
|
1532 |
, CommentNo decimal(2,0) not null comment '?R?????g???'
|
1533 |
, ParentNo decimal(2,0) not null comment '?e?R?????g???'
|
1534 |
, ApproValComment varchar(300) comment '?w???E?A???R?????g'
|
1535 |
, EntryDate datetime not null comment '?o?^???t'
|
1536 |
, UpdateDate datetime not null comment '?X?V???t'
|
1537 |
, constraint personapprovalcomment_PKC primary key (PersonCode,ApprovalCode,OrderDate,OrderNo,CommentNo)
|
1538 |
) comment '?S??????F?R?????g?f?[?^' ;
|
1539 |
|
1540 |
-- ?S??????????}?X?^
|
1541 |
drop table if exists persondepartmentmaster cascade;
|
1542 |
|
1543 |
create table persondepartmentmaster (
|
1544 |
PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
|
1545 |
, DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
|
1546 |
, AffiliationFlg decimal(1,0) not null comment '?????t???O'
|
1547 |
, EntryDate datetime not null comment '?o?^???t'
|
1548 |
, UpdateDate datetime not null comment '?X?V???t'
|
1549 |
, constraint persondepartmentmaster_PKC primary key (PersonCode,DepartmentCode)
|
1550 |
) comment '?S??????????}?X?^' ;
|
1551 |
|
1552 |
create index PersonDepartmentMaster_Index1
|
1553 |
on persondepartmentmaster(PersonCode);
|
1554 |
|
1555 |
create index PersonDepartmentMaster_Index2
|
1556 |
on persondepartmentmaster(DepartmentCode);
|
1557 |
|
1558 |
-- ?S????}?X?^
|
1559 |
drop table if exists personinchargemaster cascade;
|
1560 |
|
1561 |
create table personinchargemaster (
|
1562 |
PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
|
1563 |
, DisplayOrder decimal(8,0) unsigned not null comment '?\????'
|
1564 |
, PersonName varchar(60) not null comment '?S?????'
|
1565 |
, StartDate date not null comment '?g?p?J?n?N????'
|
1566 |
, EndDate date comment '?g?p?I???N????'
|
1567 |
, PassWord varchar(16) comment '?p?X???[?h'
|
1568 |
, SecurityManagement decimal(1,0) not null comment '?@????'
|
1569 |
, SecCode decimal(2,0) unsigned not null comment '???????'
|
1570 |
, MsgBackColor varchar(8) comment '???b?Z?[?W?w?i?F'
|
1571 |
, DisplayString varchar(20) comment '?\???E???????'
|
1572 |
, DepartmentCode decimal(5,0) unsigned comment '?????R?[?h'
|
1573 |
, MonthlySalary decimal(11,0) not null comment '???????z'
|
1574 |
, YearSalary decimal(12,0) not null comment '?N????z'
|
1575 |
, Qualification varchar(120) comment '???i?????'
|
1576 |
, SealPrintName varchar(5) comment '???\????'
|
1577 |
, EmployeeClassFlg decimal(1,0) not null comment '?????'
|
1578 |
, LedgerFlg decimal(1,0) not null comment '???v?Z???t???O'
|
1579 |
, CommutingDistance decimal(5,2) not null comment '??????'
|
1580 |
, CommuteCosts decimal(5,0) not null comment '??????'
|
1581 |
, DeleteFlg decimal(1,0) not null comment '???t???O'
|
1582 |
, EntryDate datetime not null comment '?o?^???t'
|
1583 |
, UpdateDate datetime not null comment '?X?V???t'
|
1584 |
, constraint personinchargemaster_PKC primary key (PersonCode)
|
1585 |
) comment '?S????}?X?^' ;
|
1586 |
|
1587 |
create index PersonInChargeMaster_Index1
|
1588 |
on personinchargemaster(StartDate);
|
1589 |
|
1590 |
create index PersonInChargeMaster_Index2
|
1591 |
on personinchargemaster(DepartmentCode);
|
1592 |
|
1593 |
-- ?S??????^?}?X?^
|
1594 |
drop table if exists personsalarymaster cascade;
|
1595 |
|
1596 |
create table personsalarymaster (
|
1597 |
PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
|
1598 |
, StartDate date not null comment '?g?p?J?n?N????'
|
1599 |
, MonthlySalary decimal(11,0) not null comment '???????z'
|
1600 |
, YearSalary decimal(12,0) not null comment '?N????z'
|
1601 |
, EntryDate datetime not null comment '?o?^???t'
|
1602 |
, UpdateDate datetime not null comment '?X?V???t'
|
1603 |
, constraint personsalarymaster_PKC primary key (PersonCode,StartDate)
|
1604 |
) comment '?S??????^?}?X?^' ;
|
1605 |
|
1606 |
create index PersonSalaryMaster_Index1
|
1607 |
on personsalarymaster(PersonCode);
|
1608 |
|
1609 |
create index PersonSalaryMaster_Index2
|
1610 |
on personsalarymaster(StartDate);
|
1611 |
|
1612 |
-- ?w???????f?[?^
|
1613 |
drop table if exists pointingoutcomment cascade;
|
1614 |
|
1615 |
create table pointingoutcomment (
|
1616 |
ConstructionCode decimal(10,0) not null comment '?H???R?[?h'
|
1617 |
, ProcessNo smallint(6) not null comment '????????i??????j'
|
1618 |
, SeqNo smallint(6) not null comment '????'
|
1619 |
, PageCount smallint(6) not null comment '?y?[?W???'
|
1620 |
, PersonCode decimal(8,0) not null comment '?L????R?[?h'
|
1621 |
, DrowColor varchar(8) comment '?`??F' |
1622 |
, CommentMessage varchar(1000) comment '???b?Z?[?W' |
1623 |
, StartPointX smallint(6) not null comment '?w?E?????u?w' |
1624 |
, StartPointY smallint(6) not null comment '?w?E?????u?x' |
1625 |
, CurrentPointX smallint(6) not null comment '??????u?w' |
1626 |
, CurrentPointY smallint(6) not null comment '??????u?x' |
1627 |
, CurrentWidth smallint(6) not null comment '?\???T?C?YWidth' |
1628 |
, CurrentHeight smallint(6) not null comment '?\???T?C?YHeigth' |
1629 |
, EntryDate datetime not null comment '?o?^???t' |
1630 |
, UpdateDate datetime not null comment '?X?V???t' |
1631 |
, constraint pointingoutcomment_PKC primary key (ConstructionCode,ProcessNo,SeqNo)
|
1632 |
) comment '?w???????f?[?^' ; |
1633 |
|
1634 |
-- ?????????????c???^?f?[?^
|
1635 |
drop table if exists proceedingsdata cascade;
|
1636 |
|
1637 |
create table proceedingsdata (
|
1638 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
1639 |
, ProceedingsDataDate date not null comment '?c???^????' |
1640 |
, StartMeetingTime decimal(4,0) unsigned not null comment '??c????J?n' |
1641 |
, EndMeetingTime decimal(4,0) unsigned not null comment '??c????I??' |
1642 |
, CreatorCode decimal(8,0) not null comment '????R?[?h' |
1643 |
, PalceFlag decimal(1,0) not null comment '???n?t???O' |
1644 |
, MeetingPalce varchar(120) comment '???????' |
1645 |
, EntryDate datetime not null comment '?o?^???t' |
1646 |
, UpdateDate datetime not null comment '?X?V???t' |
1647 |
, constraint proceedingsdata_PKC primary key (ConstructionCode,ProceedingsDataDate,StartMeetingTime)
|
1648 |
) comment '?????????????c???^?f?[?^' ; |
1649 |
|
1650 |
-- ?????????????c???^?f?[?^?i?o???j
|
1651 |
drop table if exists proceedingsdataattend cascade;
|
1652 |
|
1653 |
create table proceedingsdataattend (
|
1654 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
1655 |
, ProceedingsDataDate date not null comment '?c???^????' |
1656 |
, StartMeetingTime decimal(4,0) unsigned not null comment '??c????J?n' |
1657 |
, SeqNo decimal(3,0) unsigned not null comment '????s???' |
1658 |
, Department varchar(20) comment '?o??????' |
1659 |
, AttendName varchar(10) comment '?o??????' |
1660 |
, EntryDate datetime not null comment '?o?^???t' |
1661 |
, UpdateDate datetime not null comment '?X?V???t' |
1662 |
, constraint proceedingsdataattend_PKC primary key (ConstructionCode,ProceedingsDataDate,StartMeetingTime,SeqNo)
|
1663 |
) comment '?????????????c???^?f?[?^?i?o???j' ; |
1664 |
|
1665 |
-- ?????????????c???^?f?[?^?i?o???j
|
1666 |
drop table if exists proceedingsdataattendee cascade;
|
1667 |
|
1668 |
create table proceedingsdataattendee (
|
1669 |
PersonCode decimal(8,0) not null comment '????R?[?h' |
1670 |
, ProceedingsDataDate date not null comment '?c???^????' |
1671 |
, ConstructionCode int(11) not null comment '?H?????' |
1672 |
, SeqNo smallint(6) not null comment '?f?[?^?s???' |
1673 |
, Department varchar(100) comment '?o??????' |
1674 |
, AttendeeName varchar(100) comment '?o??????' |
1675 |
, EntryDate datetime not null comment '?o?^?N????' |
1676 |
, UpdateDate datetime not null comment '?X?V?N????' |
1677 |
, constraint proceedingsdataattendee_PKC primary key (PersonCode,ProceedingsDataDate,ConstructionCode,SeqNo)
|
1678 |
) comment '?????????????c???^?f?[?^?i?o???j' ; |
1679 |
|
1680 |
-- ?????????????c???^?f?[?^?i????j
|
1681 |
drop table if exists proceedingsdatadetail cascade;
|
1682 |
|
1683 |
create table proceedingsdatadetail (
|
1684 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
1685 |
, ProceedingsDataDate date not null comment '?c???^????' |
1686 |
, StartMeetingTime decimal(4,0) unsigned not null comment '??c????J?n' |
1687 |
, SeqNo decimal(3,0) unsigned not null comment '????s???' |
1688 |
, TitleNo varchar(5) comment '?c????' |
1689 |
, Title varchar(20) comment '?c??' |
1690 |
, ContentsText varchar(50) comment '???e' |
1691 |
, EntryDate datetime not null comment '?o?^???t' |
1692 |
, UpdateDate datetime not null comment '?X?V???t' |
1693 |
, constraint proceedingsdatadetail_PKC primary key (ConstructionCode,ProceedingsDataDate,StartMeetingTime,SeqNo)
|
1694 |
) comment '?????????????c???^?f?[?^?i????j' ; |
1695 |
|
1696 |
-- ???F?f?[?^
|
1697 |
drop table if exists processapproval cascade;
|
1698 |
|
1699 |
create table processapproval (
|
1700 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
1701 |
, ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???' |
1702 |
, OrderNo decimal(2,0) unsigned not null comment '??t???' |
1703 |
, SeqNo decimal(2,0) not null comment '?}??' |
1704 |
, PersonCode decimal(8,0) unsigned not null comment '?\???E???F??R?[?h' |
1705 |
, PetitionApprovalDate datetime not null comment '?\???E???F???t' |
1706 |
, ApprovalLimitDates datetime not null comment '???F??]??' |
1707 |
, ApprovalStatus decimal(1,0) not null comment '???F???' |
1708 |
, InputComment varchar(300) comment '?R?????g' |
1709 |
, EntryDate datetime not null comment '?o?^???t' |
1710 |
, UpdateDate datetime not null comment '?X?V???t' |
1711 |
, constraint processapproval_PKC primary key (ConstructionCode,ApprovalCode,OrderNo,SeqNo)
|
1712 |
) comment '???F?f?[?^' ; |
1713 |
|
1714 |
-- ???F?R?????g?f?[?^
|
1715 |
drop table if exists processapprovalcomment cascade;
|
1716 |
|
1717 |
create table processapprovalcomment (
|
1718 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
1719 |
, ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???' |
1720 |
, OrderNo decimal(2,0) unsigned not null comment '??t???' |
1721 |
, CommentNo decimal(2,0) not null comment '?R?????g???' |
1722 |
, ParentNo decimal(2,0) not null comment '?e?R?????g???' |
1723 |
, ApproValComment varchar(300) comment '?w???E?A???R?????g' |
1724 |
, EntryDate datetime not null comment '?o?^???t' |
1725 |
, UpdateDate datetime not null comment '?X?V???t' |
1726 |
, constraint processapprovalcomment_PKC primary key (ConstructionCode,ApprovalCode,OrderNo,CommentNo)
|
1727 |
) comment '???F?R?????g?f?[?^' ; |
1728 |
|
1729 |
-- ???F????f?[?^
|
1730 |
drop table if exists processapprovaldetail cascade;
|
1731 |
|
1732 |
create table processapprovaldetail (
|
1733 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
1734 |
, ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???' |
1735 |
, OrderNo decimal(2,0) unsigned not null comment '??t???' |
1736 |
, SerialNo decimal(2,0) unsigned not null comment '?}??' |
1737 |
, LinkCode decimal(10,0) not null comment '?????N???' |
1738 |
, EntryDate datetime not null comment '?o?^???t' |
1739 |
, UpdateDate datetime not null comment '?X?V???t' |
1740 |
, constraint processapprovaldetail_PKC primary key (ConstructionCode,ApprovalCode,OrderNo,SerialNo)
|
1741 |
) comment '???F????f?[?^' ; |
1742 |
|
1743 |
-- ?N?????}?X?^
|
1744 |
drop table if exists processexcutemaster cascade;
|
1745 |
|
1746 |
create table processexcutemaster (
|
1747 |
SecCode decimal(2,0) unsigned not null comment '???????' |
1748 |
, ExecCode decimal(4,0) unsigned not null comment '?N?????????' |
1749 |
, EditFlg decimal(1,0) not null comment '??W?t???O' |
1750 |
, EntryDate datetime not null comment '?o?^???t' |
1751 |
, UpdateDate datetime not null comment '?X?V???t' |
1752 |
, constraint processexcutemaster_PKC primary key (SecCode,ExecCode)
|
1753 |
) comment '?N?????}?X?^' ; |
1754 |
|
1755 |
create index ProcessExcuteMaster_Index1
|
1756 |
on processexcutemaster(SecCode);
|
1757 |
|
1758 |
create index ProcessExcuteMaster_Index2
|
1759 |
on processexcutemaster(ExecCode);
|
1760 |
|
1761 |
-- ???????f?[?^
|
1762 |
drop table if exists purchaseorder cascade;
|
1763 |
|
1764 |
create table purchaseorder (
|
1765 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
1766 |
, SeqNo decimal(3,0) unsigned not null comment '???????}??' |
1767 |
, CompanyCode decimal(8,0) not null comment '??????R?[?h' |
1768 |
, CreateDate date comment '?????t' |
1769 |
, OrderPrice decimal(12,0) not null comment '???????z' |
1770 |
, LastRowStringDate date not null comment '??I?s?\?????t' |
1771 |
, OrderSheetType decimal(1,0) not null comment '???E?{???t???O' |
1772 |
, PaymentTerms decimal(1,0) not null comment '?x????????' |
1773 |
, CashRatio decimal(4,1) not null comment '?????????i???j' |
1774 |
, BillPeriod decimal(4,0) not null comment '??`????' |
1775 |
, PrePayments decimal(1,0) not null comment '?O????'
|
1776 |
, PrePaymentsDays decimal(3,0) not null comment '?O????????'
|
1777 |
, PrePaymentsPrice decimal(12,0) not null comment '?O???????z'
|
1778 |
, PartialPayment decimal(1,0) not null comment '??????'
|
1779 |
, PartialPaymentMounth decimal(2,0) unsigned not null comment '???????????'
|
1780 |
, PartialPaymentDay1 decimal(2,0) unsigned not null comment '???????????'
|
1781 |
, PartialPaymentDay2 decimal(2,0) unsigned not null comment '???????x????'
|
1782 |
, PartialPaymentPrice decimal(12,0) not null comment '?????????z'
|
1783 |
, CompletionPayment decimal(1,0) not null comment '???n??????x??'
|
1784 |
, CompletionPaymentDays decimal(3,0) unsigned not null comment '???n??????x??????'
|
1785 |
, CompletionPaymentPrice decimal(12,0) not null comment '???n??????x?????z'
|
1786 |
, LeadEngineerCode decimal(8,0) comment '??C?Z?p??R?[?h'
|
1787 |
, LeadEngineerName varchar(60) comment '??C?Z?p???'
|
1788 |
, SafetyOfficerCode decimal(8,0) comment '???S?????R?[?h'
|
1789 |
, SafetyOfficerName varchar(60) comment '???S??????'
|
1790 |
, WorkersCount decimal(3,0) unsigned comment '??????'
|
1791 |
, PrintoutDate date not null comment '????N????'
|
1792 |
, EntryDate datetime not null comment '?o?^???t'
|
1793 |
, UpdateDate datetime not null comment '?X?V???t'
|
1794 |
, constraint purchaseorder_PKC primary key (ConstructionCode,SeqNo)
|
1795 |
) comment '???????f?[?^' ;
|
1796 |
|
1797 |
-- ?????????t?f?[?^
|
1798 |
drop table if exists purchaseorderdate cascade;
|
1799 |
|
1800 |
create table purchaseorderdate (
|
1801 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
|
1802 |
, SeqNo decimal(3,0) unsigned not null comment '???????}??'
|
1803 |
, CompanyCode decimal(8,0) not null comment '??????R?[?h'
|
1804 |
, SendDate date not null comment '???????X????'
|
1805 |
, ReturnDate date not null comment '???????????'
|
1806 |
, ReturnCheckDate date not null comment '??????????m?F??'
|
1807 |
, EntryDate datetime not null comment '?o?^???t'
|
1808 |
, UpdateDate datetime not null comment '?X?V???t'
|
1809 |
, constraint purchaseorderdate_PKC primary key (ConstructionCode,SeqNo)
|
1810 |
) comment '?????????t?f?[?^' ;
|
1811 |
|
1812 |
-- ??????????f?[?^
|
1813 |
drop table if exists purchaseorderdetail cascade;
|
1814 |
|
1815 |
create table purchaseorderdetail (
|
1816 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
|
1817 |
, SeqNo decimal(3,0) unsigned not null comment '???????}??'
|
1818 |
, GroupCount decimal(1,0) not null comment '?O???[?v???'
|
1819 |
, LineCount decimal(3,0) unsigned not null comment '?s???'
|
1820 |
, ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
|
1821 |
, ItemCode decimal(5,0) unsigned not null comment '?H??L?['
|
1822 |
, FirstString varchar(120) comment '?H??E?i??'
|
1823 |
, SecondString varchar(120) comment '???e????'
|
1824 |
, UnitCount decimal(8,2) not null comment '????'
|
1825 |
, UnitName varchar(30) comment '?P??'
|
1826 |
, UnitPrice decimal(10,0) not null comment '?P??'
|
1827 |
, OrdersLinePrice decimal(12,0) comment '???z'
|
1828 |
, SourceCode decimal(10,0) unsigned not null comment '?\?Z?????H?????'
|
1829 |
, SourceLineCnt decimal(3,0) unsigned not null comment '?????????????s???'
|
1830 |
, EntryDate datetime not null comment '?o?^???t'
|
1831 |
, UpdateDate datetime not null comment '?X?V???t'
|
1832 |
, constraint purchaseorderdetail_PKC primary key (ConstructionCode,SeqNo,GroupCount,LineCount)
|
1833 |
) comment '??????????f?[?^' ;
|
1834 |
|
1835 |
create index POrderDetail_Index1
|
1836 |
on purchaseorderdetail(SourceCode);
|
1837 |
|
1838 |
-- ?????f?[?^
|
1839 |
drop table if exists requestdata cascade;
|
1840 |
|
1841 |
create table requestdata (
|
1842 |
REQUESTNO decimal(9,0) not null comment '????No'
|
1843 |
, MAINCONSTRUCTIONCODE decimal(10,0) not null comment '?{?H?????'
|
1844 |
, CONSTRUCTIONNAME varchar(120) not null comment '?H??????'
|
1845 |
, CONTRACTAMOUNT decimal(10,0) not null comment '???????z'
|
1846 |
, PAIDAMOUNT decimal(10,0) not null comment '????????z'
|
1847 |
, REQUESTAMOUNT0 decimal(10,0) not null comment '???????z?O'
|
1848 |
, REQUESTAMOUNT1 decimal(10,0) not null comment '???????z?P'
|
1849 |
, REQUESTAMOUNT2 decimal(10,0) comment '???????z?Q'
|
1850 |
, REQUESTAMOUNT3 decimal(10,0) comment '???????z?R'
|
1851 |
, REQUESTAMOUNT4 decimal(10,0) comment '???????z?S'
|
1852 |
, REQUESTAMOUNT5 decimal(10,0) comment '???????z?T'
|
1853 |
, REQUESTAMOUNT6 decimal(10,0) comment '???????z?U'
|
1854 |
, UNCLAIMEDAMOUNT decimal(10,0) not null comment '?????c???z'
|
1855 |
, UNPAIDAMOUNT decimal(10,0) not null comment '?????????z'
|
1856 |
, TAXAMOUNT decimal(10,0) not null comment '?????'
|
1857 |
, NOTE varchar(120) not null comment '???l'
|
1858 |
, ENTRYDATE datetime not null comment '?o?^?N????'
|
1859 |
, UPDATEDATE datetime not null comment '?X?V?N????'
|
1860 |
, constraint requestdata_PKC primary key (REQUESTNO,MAINCONSTRUCTIONCODE)
|
1861 |
) comment '?????f?[?^' ;
|
1862 |
|
1863 |
-- ?????f?[?^????
|
1864 |
drop table if exists requestdatadetail cascade;
|
1865 |
|
1866 |
create table requestdatadetail (
|
1867 |
REQUESTNO decimal(9,0) not null comment '????No'
|
1868 |
, MAINCONSTRUCTIONCODE decimal(10,0) not null comment '?{?H?????'
|
1869 |
, CONSTRUCTIONCODE decimal(10,0) not null comment '?H?????'
|
1870 |
, CONSTRUCTIONKIND decimal(1,0) not null comment '?H????'
|
1871 |
, REQUESTAMOUNT decimal(10,0) not null comment '???????z'
|
1872 |
, TAXAMOUNT decimal(10,0) not null comment '?????'
|
1873 |
, ENTRYDATE datetime not null comment '?o?^?N????'
|
1874 |
, UPDATEDATE datetime not null comment '?X?V?N????'
|
1875 |
, constraint requestdatadetail_PKC primary key (REQUESTNO,MAINCONSTRUCTIONCODE,CONSTRUCTIONCODE,CONSTRUCTIONKIND)
|
1876 |
) comment '?????f?[?^????' ;
|
1877 |
|
1878 |
-- ?????w?b?_
|
1879 |
drop table if exists requesthead cascade;
|
1880 |
|
1881 |
create table requesthead (
|
1882 |
REQUESTNO decimal(9,0) not null comment '????No'
|
1883 |
, REQCONSTRUCTIONCODE decimal(10,0) not null comment '?????H?????'
|
1884 |
, ORDERNO decimal(2,0) not null comment '??t???'
|
1885 |
, REQUESTMONTH decimal(6,0) not null comment '??????'
|
1886 |
, ORDERERSDIVISION decimal(5,0) not null comment '???????'
|
1887 |
, ORDERERSCODE decimal(5,0) not null comment '??????R?[?h'
|
1888 |
, ORDERERSNAME varchar(120) not null comment '???????'
|
1889 |
, REQCONSTRUCTIONNAME varchar(120) not null comment '?????H??????'
|
1890 |
, REQUESTTOTALAMOUNT decimal(10,0) not null comment '???????z???v'
|
1891 |
, REQUESTAMOUNT decimal(10,0) not null comment '???????z'
|
1892 |
, TAXAMOUNT decimal(10,0) not null comment '?????'
|
1893 |
, UNPAIDAMOUNT decimal(10,0) comment '??????'
|
1894 |
, NOTE varchar(120) comment '???l'
|
1895 |
, ASSIGNEDFLG decimal(1,0) comment '??????t???O'
|
1896 |
, INVOICENO decimal(9,0) not null comment '??????No'
|
1897 |
, ENTRYDATE datetime not null comment '?o?^?N????'
|
1898 |
, UPDATEDATE datetime not null comment '?X?V?N????'
|
1899 |
, constraint requesthead_PKC primary key (REQUESTNO)
|
1900 |
) comment '?????w?b?_' ;
|
1901 |
|
1902 |
alter table requesthead add unique REQCONSTRUCTIONCODE (REQCONSTRUCTIONCODE,ORDERNO) ;
|
1903 |
|
1904 |
-- ?????????t?f?[?^
|
1905 |
drop table if exists requestorderdate cascade;
|
1906 |
|
1907 |
create table requestorderdate (
|
1908 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
|
1909 |
, InvoiceNo decimal(9,0) not null comment '??????No'
|
1910 |
, SendDate date not null comment '???????????X????'
|
1911 |
, EntryDate datetime not null comment '?o?^???t'
|
1912 |
, UpdateDate datetime not null comment '?X?V???t'
|
1913 |
, constraint requestorderdate_PKC primary key (ConstructionCode,InvoiceNo)
|
1914 |
) comment '?????????t?f?[?^' ;
|
1915 |
|
1916 |
-- ????O???t?f?[?^
|
1917 |
drop table if exists salesgraphdata cascade;
|
1918 |
|
1919 |
create table salesgraphdata (
|
1920 |
GraphDataCode decimal(8,0) not null comment '?O???t?f?[?^?R?[?h'
|
1921 |
, ConstructionPeriod decimal(4,0) unsigned not null comment '?????'
|
1922 |
, SalesDataDays date not null comment '????N??'
|
1923 |
, DisplayOrder decimal(8,0) unsigned not null comment '?\????'
|
1924 |
, DataName varchar(100) not null comment '?f?[?^?\??????'
|
1925 |
, SalesAmount decimal(10,0) not null comment '????f?[?^'
|
1926 |
, AdministrativeExpense decimal(10,0) not null comment '???E?????o??'
|
1927 |
, GrossProfit decimal(10,0) not null comment '?e???v'
|
1928 |
, NetIncome decimal(10,0) not null comment '?????v(???v)'
|
1929 |
, EntryDate datetime not null comment '?o?^???t'
|
1930 |
, UpdateDate datetime not null comment '?X?V???t'
|
1931 |
, constraint salesgraphdata_PKC primary key (GraphDataCode,ConstructionPeriod,SalesDataDays)
|
1932 |
) comment '????O???t?f?[?^' ;
|
1933 |
|
1934 |
create index SalesGraphData_Idx1
|
1935 |
on salesgraphdata(DisplayOrder);
|
1936 |
|
1937 |
create index SalesGraphData_idx2
|
1938 |
on salesgraphdata(ConstructionPeriod);
|
1939 |
|
1940 |
-- ?????}?X?^
|
1941 |
drop table if exists securitymaster cascade;
|
1942 |
|
1943 |
create table securitymaster (
|
1944 |
SecCode decimal(2,0) unsigned not null comment '???????'
|
1945 |
, DisplayOrder decimal(2,0) not null comment '?\????'
|
1946 |
, SecName varchar(60) not null comment '????????'
|
1947 |
, SecRank decimal(1,0) not null comment '?????????N'
|
1948 |
, SecRange decimal(1,0) not null comment '???????'
|
1949 |
, GeneralAffairs decimal(1,0) not null comment '????????t???O'
|
1950 |
, SelectBackColor varchar(8) not null comment '?I??w?i?F'
|
1951 |
, EntryDate datetime not null comment '?o?^???t'
|
1952 |
, UpdateDate datetime not null comment '?X?V???t'
|
1953 |
, constraint securitymaster_PKC primary key (SecCode)
|
1954 |
) comment '?????}?X?^' ;
|
1955 |
|
1956 |
create index SecurityMaster_Index1
|
1957 |
on securitymaster(DisplayOrder);
|
1958 |
|
1959 |
create index SecurityMaster_Index2
|
1960 |
on securitymaster(SecRank);
|
1961 |
|
1962 |
create index SecurityMaster_Index3
|
1963 |
on securitymaster(SecRange);
|
1964 |
|
1965 |
-- ???S?p?g???[???f?[?^
|
1966 |
drop table if exists sfpdata cascade;
|
1967 |
|
1968 |
create table sfpdata (
|
1969 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
|
1970 |
, DataCount decimal(2,0) unsigned not null comment '?p?g???[????'
|
1971 |
, RequestDate datetime not null comment '?p?g???[???v??????'
|
1972 |
, PersonCode decimal(8,0) unsigned not null comment '?\????R?[?h'
|
1973 |
, StringValue varchar(300) comment '?R?????g'
|
1974 |
, OrderNo decimal(2,0) unsigned not null comment '?\????t???'
|
1975 |
, EntryDate datetime not null comment '?o?^???t'
|
1976 |
, UpdateDate datetime not null comment '?X?V???t'
|
1977 |
, constraint sfpdata_PKC primary key (ConstructionCode,DataCount)
|
1978 |
) comment '???S?p?g???[???f?[?^' ;
|
1979 |
|
1980 |
create index SFPData_Index1
|
1981 |
on sfpdata(RequestDate);
|
1982 |
|
1983 |
-- ???S?p?g???[??????f?[?^
|
1984 |
drop table if exists sfpdatadetail cascade;
|
1985 |
|
1986 |
create table sfpdatadetail (
|
1987 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
|
1988 |
, DataCount decimal(2,0) unsigned not null comment '?p?g???[????'
|
1989 |
, SeqNo decimal(2,0) unsigned not null comment '?f?[?^?}??'
|
1990 |
, CompanyCode decimal(8,0) unsigned not null comment '??????R?[?h'
|
1991 |
, EntryDate datetime not null comment '?o?^???t'
|
1992 |
, UpdateDate datetime not null comment '?X?V???t'
|
1993 |
, constraint sfpdatadetail_PKC primary key (ConstructionCode,DataCount,SeqNo)
|
1994 |
) comment '???S?p?g???[??????f?[?^' ;
|
1995 |
|
1996 |
-- ??????{?H?H??o?^?\???f?[?^
|
1997 |
drop table if exists subconstrjobitemregist cascade;
|
1998 |
|
1999 |
create table subconstrjobitemregist (
|
2000 |
PersonCode decimal(8,0) unsigned not null comment '?\??????'
|
2001 |
, CreateDate date not null comment '????'
|
2002 |
, SeqNo decimal(2,0) unsigned not null comment '?\???A??'
|
2003 |
, DisplayOrder decimal(8,0) unsigned not null comment '?\????'
|
2004 |
, ItemCode decimal(5,0) unsigned not null comment '?H??L?['
|
2005 |
, EntryDate datetime not null comment '?o?^???t'
|
2006 |
, UpdateDate datetime not null comment '?X?V???t'
|
2007 |
, constraint subconstrjobitemregist_PKC primary key (PersonCode,CreateDate,SeqNo,DisplayOrder)
|
2008 |
) comment '??????{?H?H??o?^?\???f?[?^' ;
|
2009 |
|
2010 |
-- ??????E?????N?o?^?\???f?[?^
|
2011 |
drop table if exists subconstrjoblinkregist cascade;
|
2012 |
|
2013 |
create table subconstrjoblinkregist (
|
2014 |
PersonCode decimal(8,0) unsigned not null comment '?\??????'
|
2015 |
, CreateDate date not null comment '????'
|
2016 |
, SeqNo decimal(2,0) unsigned not null comment '?\???A??'
|
2017 |
, DisplayOrder decimal(8,0) unsigned not null comment '?\????'
|
2018 |
, JobCategoryCode decimal(5,0) not null comment '?E??L?['
|
2019 |
, EntryDate datetime not null comment '?o?^???t'
|
2020 |
, UpdateDate datetime not null comment '?X?V???t'
|
2021 |
, constraint subconstrjoblinkregist_PKC primary key (PersonCode,CreateDate,SeqNo,DisplayOrder)
|
2022 |
) comment '??????E?????N?o?^?\???f?[?^' ;
|
2023 |
|
2024 |
-- ??????o?^?\???f?[?^
|
2025 |
drop table if exists subconstrregist cascade;
|
2026 |
|
2027 |
create table subconstrregist (
|
2028 |
PersonCode decimal(8,0) unsigned not null comment '?\??????'
|
2029 |
, CreateDate date not null comment '????'
|
2030 |
, SeqNo decimal(2,0) unsigned not null comment '?\???A??'
|
2031 |
, DataMode decimal(1,0) comment '?f?[?^??'
|
2032 |
, SourceCode decimal(8,0) not null comment '??????R?[?h'
|
2033 |
, PetitionPeriod decimal(4,0) unsigned not null comment '?\???N?x'
|
2034 |
, CorporateStatusName varchar(40) comment '?@?l?i????'
|
2035 |
, CorporateStatusPoint decimal(1,0) not null comment '?@?l?i?????u'
|
2036 |
, CompanyName varchar(100) not null comment '???????'
|
2037 |
, CEOPositionName varchar(60) comment '??\???E??'
|
2038 |
, CEOName varchar(60) comment '??\?????'
|
2039 |
, ContactPersonName varchar(60) comment '?S???????'
|
2040 |
, ZipCode varchar(8) comment '?X????'
|
2041 |
, Address1 varchar(60) comment '?Z???P'
|
2042 |
, Address2 varchar(60) comment '?Z??2'
|
2043 |
, Address3 varchar(60) comment '?Z??3'
|
2044 |
, CellPhoneNumber varchar(13) comment '?g??d?b???'
|
2045 |
, MailAddress varchar(257) comment '???[???A?h???X'
|
2046 |
, PhoneNumber varchar(13) comment '?d?b???'
|
2047 |
, FaxNumber varchar(13) comment 'FAX???'
|
2048 |
, JapaneseSyllabary varchar(2) comment '50?????'
|
2049 |
, StartDate date not null comment '????J?n?N????'
|
2050 |
, Note varchar(300) comment '???l'
|
2051 |
, labourKind decimal(1,0) not null comment '?x???????E????'
|
2052 |
, OrderDate date comment '?\????'
|
2053 |
, OrderNo decimal(2,0) unsigned not null comment '?\????t???'
|
2054 |
, EntryDate datetime not null comment '?o?^???t'
|
2055 |
, UpdateDate datetime not null comment '?X?V???t'
|
2056 |
, constraint subconstrregist_PKC primary key (PersonCode,CreateDate,SeqNo)
|
2057 |
) comment '??????o?^?\???f?[?^' ;
|
2058 |
|
2059 |
-- ??????H??}?X?^
|
2060 |
drop table if exists subcontractoritemmaster cascade;
|
2061 |
|
2062 |
create table subcontractoritemmaster (
|
2063 |
ItemCode decimal(5,0) unsigned not null comment '?H??L?['
|
2064 |
, DisplayOrder decimal(5,0) unsigned not null comment '?\????'
|
2065 |
, ItemName varchar(120) not null comment '?H????'
|
2066 |
, DeleteFlg decimal(1,0) not null comment '???t???O'
|
2067 |
, EntryDate datetime not null comment '?o?^???t'
|
2068 |
, UpdateDate datetime not null comment '?X?V???t'
|
2069 |
, constraint subcontractoritemmaster_PKC primary key (ItemCode)
|
2070 |
) comment '??????H??}?X?^' ;
|
2071 |
|
2072 |
-- ??????E??}?X?^
|
2073 |
drop table if exists subcontractorjobcategory cascade;
|
2074 |
|
2075 |
create table subcontractorjobcategory (
|
2076 |
JobCategoryCode decimal(5,0) not null comment '?E??L?['
|
2077 |
, DisplayOrder decimal(5,0) unsigned not null comment '?\????'
|
2078 |
, JobCategoryName varchar(120) not null comment '?E????'
|
2079 |
, DeleteFlg decimal(1,0) not null comment '???t???O'
|
2080 |
, EntryDate datetime not null comment '?o?^???t'
|
2081 |
, UpdateDate datetime not null comment '?X?V???t'
|
2082 |
, constraint subcontractorjobcategory_PKC primary key (JobCategoryCode)
|
2083 |
) comment '??????E??}?X?^' ;
|
2084 |
|
2085 |
-- ??????{?H?H??f?[?^
|
2086 |
drop table if exists subcontractorjobitem cascade;
|
2087 |
|
2088 |
create table subcontractorjobitem (
|
2089 |
CompanyCode decimal(8,0) not null comment '??????R?[?h'
|
2090 |
, ItemCode decimal(5,0) unsigned not null comment '?H??L?['
|
2091 |
, DisplayOrder decimal(5,0) unsigned not null comment '?\????'
|
2092 |
, EntryDate datetime not null comment '?o?^???t'
|
2093 |
, UpdateDate datetime not null comment '?X?V???t'
|
2094 |
, constraint subcontractorjobitem_PKC primary key (CompanyCode,ItemCode)
|
2095 |
) comment '??????{?H?H??f?[?^' ;
|
2096 |
|
2097 |
create index SubContractorJobItem_Index1
|
2098 |
on subcontractorjobitem(CompanyCode);
|
2099 |
|
2100 |
create index SubContractorJobItem_Index2
|
2101 |
on subcontractorjobitem(ItemCode);
|
2102 |
|
2103 |
-- ??????E?????N?}?X?^
|
2104 |
drop table if exists subcontractorjoblink cascade;
|
2105 |
|
2106 |
create table subcontractorjoblink (
|
2107 |
CompanyCode decimal(8,0) not null comment '??????R?[?h'
|
2108 |
, JobCategoryCode decimal(5,0) not null comment '?E??L?['
|
2109 |
, DisplayOrder decimal(5,0) unsigned not null comment '?\????'
|
2110 |
, EntryDate datetime not null comment '?o?^???t'
|
2111 |
, UpdateDate datetime not null comment '?X?V???t'
|
2112 |
, constraint subcontractorjoblink_PKC primary key (CompanyCode,JobCategoryCode)
|
2113 |
) comment '??????E?????N?}?X?^' ;
|
2114 |
|
2115 |
create index SubContractorJobLink_Index1
|
2116 |
on subcontractorjoblink(CompanyCode);
|
2117 |
|
2118 |
create index SubContractorJobLink_Index2
|
2119 |
on subcontractorjoblink(JobCategoryCode);
|
2120 |
|
2121 |
-- ??????}?X?^
|
2122 |
drop table if exists subcontractormaster cascade;
|
2123 |
|
2124 |
create table subcontractormaster (
|
2125 |
CompanyCode decimal(8,0) not null comment '??????R?[?h'
|
2126 |
, DisplayOrder decimal(8,0) unsigned not null comment '?\????'
|
2127 |
, CorporateStatusName varchar(40) comment '?@?l?i????'
|
2128 |
, CorporateStatusPoint decimal(1,0) not null comment '?@?l?i?????u'
|
2129 |
, CompanyName varchar(100) not null comment '???????'
|
2130 |
, CEOPositionName varchar(60) comment '??\???E??'
|
2131 |
, CEOName varchar(60) comment '??\?????'
|
2132 |
, ContactPersonName varchar(60) comment '?S???????'
|
2133 |
, ZipCode varchar(8) comment '?X????'
|
2134 |
, Address1 varchar(60) comment '?Z???P'
|
2135 |
, Address2 varchar(60) comment '?Z??2'
|
2136 |
, Address3 varchar(60) comment '?Z??3'
|
2137 |
, CellPhoneNumber varchar(13) comment '?g??d?b???'
|
2138 |
, MailAddress varchar(257) comment '???[???A?h???X'
|
2139 |
, PhoneNumber varchar(13) comment '?d?b???'
|
2140 |
, FaxNumber varchar(13) comment 'FAX???'
|
2141 |
, JapaneseSyllabary varchar(2) comment '50?????'
|
2142 |
, StartDate date not null comment '????J?n?N????'
|
2143 |
, Note varchar(300) comment '???l'
|
2144 |
, labourKind decimal(1,0) not null comment '?x???????E????'
|
2145 |
, DeleteFlg decimal(1,0) default '0' not null comment '???t???O'
|
2146 |
, EntryDate datetime not null comment '?o?^???t'
|
2147 |
, UpdateDate datetime not null comment '?X?V???t'
|
2148 |
, constraint subcontractormaster_PKC primary key (CompanyCode)
|
2149 |
) comment '??????}?X?^' ;
|
2150 |
|
2151 |
create index SubContractorMaster_Index1
|
2152 |
on subcontractormaster(JapaneseSyllabary);
|
2153 |
|
2154 |
-- ?d????}?X?^
|
2155 |
drop table if exists suppliersmaster cascade;
|
2156 |
|
2157 |
create table suppliersmaster (
|
2158 |
SuppliersCode decimal(5,0) unsigned not null comment '?d????R?[?h'
|
2159 |
, DisplayOrder decimal(5,0) unsigned not null comment '?\????'
|
2160 |
, SuppliersName1 varchar(60) not null comment '?d????1'
|
2161 |
, SuppliersName2 varchar(60) comment '?d?????Q'
|
2162 |
, ZipCode varchar(8) comment '?X????'
|
2163 |
, Address1 varchar(60) comment '?Z???P'
|
2164 |
, Address2 varchar(60) comment '?Z??2'
|
2165 |
, Address3 varchar(60) comment '?Z??3'
|
2166 |
, PhoneNumber varchar(13) comment '?d?b???'
|
2167 |
, FaxNumber varchar(13) comment 'FAX???'
|
2168 |
, Note varchar(300) comment '???l'
|
2169 |
, DeleteFlg decimal(1,0) not null comment '???t???O'
|
2170 |
, EntryDate datetime not null comment '?o?^???t'
|
2171 |
, UpdateDate datetime not null comment '?X?V???t'
|
2172 |
, constraint suppliersmaster_PKC primary key (SuppliersCode)
|
2173 |
) comment '?d????}?X?^' ;
|
2174 |
|
2175 |
-- ?V?X?e???N???m?F?f?[?^
|
2176 |
drop table if exists systemexecute cascade;
|
2177 |
|
2178 |
create table systemexecute (
|
2179 |
PrimaryCode tinyint(4) not null comment '?L?[????'
|
2180 |
, TargetDate date not null comment '?N?????t'
|
2181 |
, SystemVersion int(11) not null comment '?{??E????o?[?W????'
|
2182 |
, UpDateCopyVersion int(11) not null comment '?R?s?[?o?[?W????'
|
2183 |
, EntryDate datetime not null comment '?o?^???t'
|
2184 |
, UpdateDate datetime not null comment '?X?V???t'
|
2185 |
, constraint systemexecute_PKC primary key (PrimaryCode)
|
2186 |
) comment '?V?X?e???N???m?F?f?[?^' ;
|
2187 |
|
2188 |
-- ????}?X?^
|
2189 |
drop table if exists systemmaster cascade;
|
2190 |
|
2191 |
create table systemmaster (
|
2192 |
SystemCode decimal(3,0) unsigned not null comment '???R?[?h'
|
2193 |
, CompanyName1 varchar(60) not null comment '?????P'
|
2194 |
, CompanyName2 varchar(60) comment '?????Q'
|
2195 |
, CEOName varchar(60) not null comment '??\?????'
|
2196 |
, CEOPositionName varchar(60) comment '??\???E??'
|
2197 |
, ZipCode varchar(8) not null comment '?X????'
|
2198 |
, Address1 varchar(60) not null comment '?Z???P'
|
2199 |
, Address2 varchar(60) comment '?Z??2'
|
2200 |
, Address3 varchar(60) comment '?Z??3'
|
2201 |
, PhoneNumber varchar(13) not null comment '?d?b???'
|
2202 |
, FaxNumber varchar(13) comment 'FAX???'
|
2203 |
, HomePageURL varchar(120) comment '?z?[???y?[?WURL'
|
2204 |
, ConstructionExpenses decimal(4,2) not null comment '?H?????o??'
|
2205 |
, OfficeExpenses decimal(4,2) not null comment '???????o??'
|
2206 |
, OperatingExpenses decimal(4,2) not null comment '?c??o??'
|
2207 |
, ConsumptionTax decimal(4,2) not null comment '?????'
|
2208 |
, CooperationRate decimal(4,2) not null comment '???????'
|
2209 |
, StatutoryWelfareRate decimal(4,2) not null comment '?@???????'
|
2210 |
, FuelPrice decimal(5,2) not null comment '?R???L???P??'
|
2211 |
, AreaDistance decimal(5,2) not null comment '????u????????'
|
2212 |
, ExcelSavePath varchar(120) comment 'Excel????p?X'
|
2213 |
, BusinessPeriod smallint(6) not null comment '????c?????'
|
2214 |
, ConstructionYear smallint(6) not null comment '????H???N?x'
|
2215 |
, BusinessBeginningDate varchar(5) not null comment '?c????????'
|
2216 |
, ConstructionBeginningDate varchar(5) not null comment '?H???N?x?????'
|
2217 |
, ConstructionNoBase decimal(1,0) not null comment '?H????????l'
|
2218 |
, SloganString1 varchar(100) comment '?W??1'
|
2219 |
, SloganString2 varchar(100) comment '?W??2'
|
2220 |
, SloganString3 varchar(100) comment '?W??3'
|
2221 |
, EntryDate datetime not null comment '?o?^???t'
|
2222 |
, UpdateDate datetime not null comment '?X?V???t'
|
2223 |
, constraint systemmaster_PKC primary key (SystemCode)
|
2224 |
) comment '????}?X?^' ;
|
2225 |
|
2226 |
-- ?????}?X?^
|
2227 |
drop table if exists termmaster cascade;
|
2228 |
|
2229 |
create table termmaster (
|
2230 |
ConstructionStatusFlg decimal(2,0) not null comment '?H?????t???O'
|
2231 |
, FieldNo decimal(2,0) not null comment '?`?F?b?N???t?B?[???h???' |
2232 |
, SeqNo decimal(2,0) not null comment '?}??' |
2233 |
, DisplayOrder decimal(2,0) not null comment '?\????' |
2234 |
, CheckSchdule decimal(1,0) not null comment '?`?F?b?N?^?C?~???O' |
2235 |
, TermDays decimal(3,0) not null comment '?o???'
|
2236 |
, SendTitile varchar(100) comment '?^?C?g??'
|
2237 |
, SendMessage varchar(100) comment '???b?Z?[?W'
|
2238 |
, BackColor varchar(8) comment '?w?i?F'
|
2239 |
, ForeColor varchar(8) comment '?????F'
|
2240 |
, EntryDate datetime not null comment '?o?^???t'
|
2241 |
, UpdateDate datetime not null comment '?X?V???t'
|
2242 |
, constraint termmaster_PKC primary key (ConstructionStatusFlg,FieldNo,SeqNo)
|
2243 |
) comment '?????}?X?^' ;
|
2244 |
|
2245 |
create index TermMaster_Index1
|
2246 |
on termmaster(DisplayOrder);
|
2247 |
|
2248 |
-- ?o?????f?[?^
|
2249 |
drop table if exists tranceportdailydata cascade;
|
2250 |
|
2251 |
create table tranceportdailydata (
|
2252 |
PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
|
2253 |
, AttendanceDate date not null comment '???????'
|
2254 |
, StartDistance decimal(7,1) not null comment '?????o???L????'
|
2255 |
, ComplateDistance decimal(7,1) not null comment '?????I???L????'
|
2256 |
, TotalDistance decimal(6,1) not null comment '???????v?L????'
|
2257 |
, OfficeGoFlg decimal(1,0) not null comment '???????o??t???O'
|
2258 |
, OfficeOutFlg decimal(1,0) not null comment '???????A??t???O'
|
2259 |
, TrancePayGoFlg decimal(1,0) not null comment '?L?????o??t???O'
|
2260 |
, TrancePayOutFlg decimal(1,0) not null comment '?L?????A??t???O'
|
2261 |
, WareHouseFlg decimal(1,0) not null comment '????u??t???O'
|
2262 |
, EntryDate datetime not null comment '?o?^???t'
|
2263 |
, UpdateDate datetime not null comment '?X?V???t'
|
2264 |
, constraint tranceportdailydata_PKC primary key (PersonCode,AttendanceDate)
|
2265 |
) comment '?o?????f?[?^' ;
|
2266 |
|
2267 |
create index TranceportDailyData_Index1
|
2268 |
on tranceportdailydata(AttendanceDate);
|
2269 |
|
2270 |
-- ?H?????o???}?X?^
|
2271 |
drop table if exists typeexpensesmaster cascade;
|
2272 |
|
2273 |
create table typeexpensesmaster (
|
2274 |
TypeCode decimal(5,0) unsigned not null comment '?H?????R?[?h'
|
2275 |
, ExpensesPeriod smallint(6) not null comment '?????'
|
2276 |
, NameCode decimal(5,0) unsigned not null comment '?o????R?[?h'
|
2277 |
, ExpensesRaito decimal(4,2) not null comment '?o??'
|
2278 |
, DeleteFlg decimal(1,0) not null comment '???t???O'
|
2279 |
, EntryDate datetime not null comment '?o?^???t'
|
2280 |
, UpdateDate datetime not null comment '?X?V???t'
|
2281 |
, constraint typeexpensesmaster_PKC primary key (TypeCode,ExpensesPeriod,NameCode)
|
2282 |
) comment '?H?????o???}?X?^' ;
|
2283 |
|
2284 |
-- ?P??}?X?^
|
2285 |
drop table if exists unitmaster cascade;
|
2286 |
|
2287 |
create table unitmaster (
|
2288 |
UnitKey decimal(5,0) unsigned not null comment '?P??L?['
|
2289 |
, DisplayOrder decimal(5,0) unsigned not null comment '?\????'
|
2290 |
, UnitName varchar(30) not null comment '?P?????'
|
2291 |
, EntryDate datetime not null comment '?o?^???t'
|
2292 |
, UpdateDate datetime not null comment '?X?V???t'
|
2293 |
, constraint unitmaster_PKC primary key (UnitKey)
|
2294 |
) comment '?P??}?X?^' ;
|
2295 |
|
2296 |
create index UnitMaster_Index1
|
2297 |
on unitmaster(DisplayOrder);
|
2298 |
|
2299 |
-- ????}?X?^
|
2300 |
drop table if exists vehiclemaster cascade;
|
2301 |
|
2302 |
create table vehiclemaster (
|
2303 |
VehicleCode decimal(5,0) unsigned not null comment '????R?[?h'
|
2304 |
, DisplayOrder decimal(5,0) unsigned not null comment '?\????'
|
2305 |
, VehicleName varchar(100) not null comment '???????'
|
2306 |
, RegistrationNumber varchar(30) comment '?o?^???'
|
2307 |
, IdentificationNumber varchar(30) comment '?????'
|
2308 |
, ModelCode varchar(30) comment '?^??'
|
2309 |
, DepartmentCode decimal(5,0) unsigned not null comment '???????'
|
2310 |
, VehicleScheduleFlg decimal(1,0) not null comment '????\??\???t???O'
|
2311 |
, PurchaseDate date comment '?w????'
|
2312 |
, PurchaseName varchar(30) comment '?w????'
|
2313 |
, PurchaseContactPersons varchar(30) comment '?w????S????'
|
2314 |
, PurchasePhone varchar(13) comment '?w????d?b???'
|
2315 |
, LeaseDate date comment '???[?X?J?n??'
|
2316 |
, LeaseDestination varchar(30) comment '???[?X??'
|
2317 |
, LeaseContactPersons varchar(30) comment '???[?X??S????'
|
2318 |
, LeasePhone varchar(13) comment '???[?X??d?b???'
|
2319 |
, InsuranceCompany varchar(30) comment '?C???????'
|
2320 |
, InsuranceContactPersons varchar(30) comment '?C???????S????'
|
2321 |
, InsurancePhone varchar(13) comment '?C???????d?b???'
|
2322 |
, Note varchar(300) comment '???l'
|
2323 |
, EntryDate datetime comment '?o?^???t'
|
2324 |
, UpdateDate datetime comment '?X?V???t'
|
2325 |
, constraint vehiclemaster_PKC primary key (VehicleCode)
|
2326 |
) comment '????}?X?^' ;
|
2327 |
|
2328 |
-- ????L?^?f?[?^
|
2329 |
drop table if exists vehiclerecorddata cascade;
|
2330 |
|
2331 |
create table vehiclerecorddata (
|
2332 |
VehicleCode decimal(5,0) unsigned not null comment '????R?[?h'
|
2333 |
, DivisionCode decimal(2,0) unsigned not null comment '?f?[?^??'
|
2334 |
, SeqNo decimal(2,0) not null comment '?}??'
|
2335 |
, RecordDate date comment '???n??'
|
2336 |
, Mileage mediumint(9) comment '???s????'
|
2337 |
, Content varchar(100) comment '???e'
|
2338 |
, PaymentCost decimal(10,0) comment '??p'
|
2339 |
, EntryDate datetime not null comment '?o?^???t'
|
2340 |
, UpdateDate datetime not null comment '?X?V???t'
|
2341 |
, constraint vehiclerecorddata_PKC primary key (VehicleCode,DivisionCode,SeqNo)
|
2342 |
) comment '????L?^?f?[?^' ;
|
2343 |
|
2344 |
-- ????\??f?[?^
|
2345 |
drop table if exists vehiclescheduledata cascade;
|
2346 |
|
2347 |
create table vehiclescheduledata (
|
2348 |
TargetDate date not null comment '????'
|
2349 |
, VehicleCode decimal(5,0) unsigned not null comment '????R?[?h'
|
2350 |
, MorningAfternoon decimal(1,0) not null comment '??O?E???'
|
2351 |
, PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
|
2352 |
, TargetYear year(4) not null comment '?Y???N'
|
2353 |
, TargetMonth tinyint(3) unsigned not null comment '?Y????'
|
2354 |
, TargetDay year(4) not null comment '?Y????'
|
2355 |
, EntryDate datetime not null comment '?o?^???t'
|
2356 |
, UpdateDate datetime not null comment '?X?V???t'
|
2357 |
, constraint vehiclescheduledata_PKC primary key (TargetDate,VehicleCode,MorningAfternoon)
|
2358 |
) comment '????\??f?[?^' ;
|
2359 |
|
2360 |
create index VehicleScheduleData_Index1
|
2361 |
on vehiclescheduledata(TargetYear);
|
2362 |
|
2363 |
create index VehicleScheduleData_Index2
|
2364 |
on vehiclescheduledata(TargetMonth);
|
2365 |
|
2366 |
create index VehicleScheduleData_Index3
|
2367 |
on vehiclescheduledata(TargetDay);
|
2368 |
|
2369 |
-- ?N?}?X?^
|
2370 |
drop table if exists yearmaster cascade;
|
2371 |
|
2372 |
create table yearmaster (
|
2373 |
years smallint(6) not null comment '?N'
|
2374 |
) comment '?N?}?X?^' ;
|
2375 |
|
2376 |
create index year_Index1
|
2377 |
on yearmaster(years);
|
2378 |
|