プロジェクト

全般

プロフィール

統計
| リビジョン:

h-you / branches / ddl / ProcessManagement.sql @ 334

履歴 | 表示 | アノテート | ダウンロード (111 KB)

1 198 h-you
-- Project Name : noname
2 332 h-you
-- Date/Time    : 2018/03/28 9:13:42
3 198 h-you
-- Author       : Horiuchi
4
-- RDBMS Type   : MySQL
5
-- Application  : A5:SQL Mk-2
6 84 h-you
7 271 h-you
-- ?S????s???\??f?[?^
8 325 h-you
drop table if exists actionscheduledata cascade;
9 84 h-you
10 198 h-you
create table actionscheduledata (
11 271 h-you
  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 198 h-you
  , constraint actionscheduledata_PKC primary key (TargetDate,PersonCode)
20 271 h-you
) comment '?S????s???\??f?[?^' ;
21 84 h-you
22 198 h-you
create index ActionScheduleData_Index1
23
  on actionscheduledata(TargetYear);
24 84 h-you
25 198 h-you
create index ActionScheduleData_Index2
26
  on actionscheduledata(TargetMonth);
27 84 h-you
28 198 h-you
create index ActionScheduleData_Index3
29
  on actionscheduledata(TargetDay);
30 84 h-you
31 271 h-you
-- ???F?o?H?}?X?^
32 325 h-you
drop table if exists approvalmaster cascade;
33 84 h-you
34 198 h-you
create table approvalmaster (
35 271 h-you
  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 198 h-you
  , constraint approvalmaster_PKC primary key (ApprovalCode,DepartmentCode,SeqNo)
44 271 h-you
) comment '???F?o?H?}?X?^' ;
45 84 h-you
46 271 h-you
-- ?o?????f?[?^
47 325 h-you
drop table if exists attendancedailydata cascade;
48 84 h-you
49 198 h-you
create table attendancedailydata (
50 271 h-you
  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 276 h-you
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
54 271 h-you
  , 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 198 h-you
  , constraint attendancedailydata_PKC primary key (PersonCode,AttendanceDate,SeqNo)
63 271 h-you
) comment '?o?????f?[?^' ;
64 84 h-you
65 277 h-you
create index AttendDaily_Index1
66
  on attendancedailydata(ConstructionCode);
67
68
create index AttendDaily_Index2
69
  on attendancedailydata(AttendanceDate);
70
71 271 h-you
-- ?o?????f?[?^
72 325 h-you
drop table if exists attendancedata cascade;
73 84 h-you
74 198 h-you
create table attendancedata (
75 271 h-you
  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 198 h-you
  , constraint attendancedata_PKC primary key (PersonCode,AttendanceMonth)
85 271 h-you
) comment '?o?????f?[?^' ;
86 84 h-you
87 271 h-you
-- ??s?c????}?X?^
88 325 h-you
drop table if exists bankbusinessdaymaster cascade;
89 84 h-you
90 198 h-you
create table bankbusinessdaymaster (
91 271 h-you
  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 198 h-you
  , constraint bankbusinessdaymaster_PKC primary key (YEARMONTH,BANKBUSINESSDAY)
98 271 h-you
) comment '??s?c????}?X?^' ;
99 84 h-you
100 271 h-you
-- ???????f?[?^
101 325 h-you
drop table if exists billingdata cascade;
102 84 h-you
103 198 h-you
create table billingdata (
104 271 h-you
  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 198 h-you
  , constraint billingdata_PKC primary key (COMPANYCODE,TARGETDATE,SEQNO)
111 271 h-you
) comment '???????f?[?^' ;
112 198 h-you
113 271 h-you
-- ??????????f?[?^
114 325 h-you
drop table if exists billingdatadetail cascade;
115 198 h-you
116
create table billingdatadetail (
117 271 h-you
  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 198 h-you
  , constraint billingdatadetail_PKC primary key (COMPANYCODE,TARGETDATE,SEQNO,LINECOUNT)
133 271 h-you
) comment '??????????f?[?^' ;
134 198 h-you
135 271 h-you
-- ???????x???T?}???[?f?[?^
136 325 h-you
drop table if exists billingpaymentsummary cascade;
137 198 h-you
138
create table billingpaymentsummary (
139 271 h-you
  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 198 h-you
  , constraint billingpaymentsummary_PKC primary key (COMPANYCODE,TARGETDATE,CHARGEPAYMENTKIND)
155 271 h-you
) comment '???????x???T?}???[?f?[?^' ;
156 198 h-you
157 324 h-you
-- ?^?c?????????
158 325 h-you
drop table if exists bizperiodhistory cascade;
159 324 h-you
160
create table bizperiodhistory (
161
  PeriodYear smallint(6) not null comment '?c??????E?H???N?x'
162
  , PeriodFlag smallint(1) not null comment '?c??????E?H???N?x?t???O'
163
  , BeginDate datetime not null comment '?????'
164
  , CompleteDate datetime not null comment '??????'
165
  , EntryDate datetime not null comment '?o?^???t'
166
  , UpdateDate datetime not null comment '?X?V???t'
167
  , constraint bizperiodhistory_PKC primary key (PeriodYear,PeriodFlag)
168
) comment '?^?c?????????' ;
169
170 271 h-you
-- ?H???????f?[?^?y???p?z
171 325 h-you
drop table if exists bk_constructionledger cascade;
172 84 h-you
173 198 h-you
create table bk_constructionledger (
174 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
175
  , ConstructionPeriod decimal(4,0) unsigned not null comment '?????'
176
  , CreatorCode decimal(8,0) comment '????R?[?h'
177
  , CreatorName varchar(60) comment '?????'
178
  , CreateDate date not null comment '????'
179
  , ConstructionTimes decimal(5,2) not null comment '?H???i?P??E???j'
180
  , ConstructionStart date not null comment '?_??H???J?n'
181
  , ConstructionEnd date not null comment '?_??H??????'
182
  , OrdersDecisionPrice decimal(14,0) not null comment '??????????z'
183
  , CompanyExpenses decimal(10,0) not null comment '???o???v'
184
  , DepartmentExpenses decimal(10,0) not null comment '?????o???v'
185
  , SalesExpenses decimal(10,0) not null comment '?c??o???v'
186
  , TotalPayment decimal(10,0) not null comment '???x???z'
187
  , GrossProfit decimal(10,0) not null comment '?e??'
188
  , Allowance decimal(10,0) not null comment '???^'
189
  , NetProfit decimal(10,0) not null comment '?????v'
190
  , ComplateFlg decimal(1,0) not null comment '????????t???O'
191
  , IntegrationFlg decimal(1,0) not null comment '????z??Z?t???O'
192
  , EntryDate datetime not null comment '?o?^???t'
193
  , UpdateDate datetime not null comment '?X?V???t'
194 198 h-you
  , constraint bk_constructionledger_PKC primary key (ConstructionCode)
195 271 h-you
) comment '?H???????f?[?^?y???p?z' ;
196 84 h-you
197 271 h-you
-- ?H??????????f?[?^?y???p?z
198 325 h-you
drop table if exists bk_constructionledgerdetail cascade;
199 84 h-you
200 198 h-you
create table bk_constructionledgerdetail (
201 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
202
  , GroupCount decimal(2,0) unsigned not null comment '?O???[?v???'
203
  , LineCount decimal(5,0) unsigned not null comment '?s???'
204
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
205
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
206
  , FirstString varchar(120) comment '???????'
207
  , SecondString varchar(120) comment '?H?????e'
208
  , CompanyType decimal(1,0) not null comment '??????R?[?h?^?C?v'
209
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
210
  , CompanyName varchar(120) comment '?????????'
211
  , EstimatePrice decimal(12,0) not null comment '?\?Z?i????j???z'
212
  , ExecutionAmount decimal(12,0) not null comment '???s???z'
213
  , AmountConfigRate decimal(5,2) not null comment '???z?\????'
214
  , PaymentBurden decimal(12,0) not null comment '?x????U?z'
215
  , FixDataFlg decimal(1,0) not null comment '???f?[?^?t???O'
216
  , IndependentFlg decimal(1,0) not null comment '????f?[?^?t???O'
217
  , FluctuationFlg decimal(1,0) not null comment '?????f?[?^?t???O'
218
  , SalaryFlg decimal(1,0) not null comment '???^?U????'
219
  , SalaryDays decimal(4,0) not null comment '???^?U??????'
220
  , OperatingFlg decimal(1,0) not null comment '?S?????t???O'
221
  , SourceCode decimal(10,0) unsigned not null comment '???H?????'
222
  , JoinTitleFlg decimal(1,0) not null comment '?H??????^?C?g??'
223
  , SalaryOnRegist decimal(12,0) not null comment '?o?^?????z???^'
224
  , PurchaseOrderFlg decimal(2,0) not null comment '?????????s?t???O'
225
  , EntryDate datetime not null comment '?o?^???t'
226
  , UpdateDate datetime not null comment '?X?V???t'
227 198 h-you
  , constraint bk_constructionledgerdetail_PKC primary key (ConstructionCode,GroupCount,LineCount)
228 271 h-you
) comment '?H??????????f?[?^?y???p?z' ;
229 84 h-you
230 271 h-you
-- ?H?????????s?f?[?^?y???p?z
231 325 h-you
drop table if exists bk_constructionledgerexcute cascade;
232 84 h-you
233 198 h-you
create table bk_constructionledgerexcute (
234 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
235
  , GroupCount decimal(2,0) unsigned not null comment '?O???[?v???'
236
  , LineCount decimal(5,0) unsigned not null comment '?s???'
237
  , ColumnCount decimal(3,0) not null comment '????'
238
  , PaymentAmount decimal(12,0) not null comment '?x?????z'
239
  , TargetMonth date not null comment '???N??'
240
  , EntryDate datetime not null comment '?o?^???t'
241
  , UpdateDate datetime not null comment '?X?V???t'
242 198 h-you
  , constraint bk_constructionledgerexcute_PKC primary key (ConstructionCode,GroupCount,LineCount,ColumnCount)
243 271 h-you
) comment '?H?????????s?f?[?^?y???p?z' ;
244 84 h-you
245 271 h-you
-- ??Z????f?[?^?y???p?z
246 325 h-you
drop table if exists bk_estimatedata cascade;
247 84 h-you
248 198 h-you
create table bk_estimatedata (
249 271 h-you
  SaveDate datetime not null comment '?????t'
250
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
251
  , LineCount decimal(3,0) unsigned not null comment '?s???'
252
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
253
  , FixedItemCode varchar(1) comment '?????L?['
254
  , ItemName varchar(120) comment '??????'
255
  , SpecName varchar(120) comment '???^?i???E?`??E???@'
256
  , PriceValue decimal(14,0) not null comment '???z'
257
  , note varchar(60) comment '???l'
258
  , MyExpensesFlg decimal(1,0) not null comment '????o??t???O'
259
  , InputFlg decimal(1,0) not null comment '????t???O'
260
  , EntryDate datetime not null comment '?o?^???t'
261
  , UpdateDate datetime not null comment '?X?V???t'
262 198 h-you
  , constraint bk_estimatedata_PKC primary key (SaveDate,ConstructionCode,LineCount)
263 271 h-you
) comment '??Z????f?[?^?y???p?z' ;
264 84 h-you
265 271 h-you
-- ??Z????y?[?W?f?[?^?y???p?z
266 325 h-you
drop table if exists bk_estimatedatabody cascade;
267 84 h-you
268 198 h-you
create table bk_estimatedatabody (
269 271 h-you
  SaveDate datetime not null comment '?????t'
270
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
271
  , PageCount decimal(4,0) unsigned not null comment '?y?[?W???'
272
  , Category decimal(1,0) not null comment '?y?[?W??'
273
  , UnionComponentCode decimal(5,0) unsigned not null comment '?????\???L?['
274
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
275
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
276
  , SelectComponent decimal(5,0) unsigned not null comment '?I???\???L?['
277
  , PageTitle varchar(120) not null comment '?y?[?W?\????'
278
  , DetailLineCount decimal(3,0) unsigned not null comment '????s???'
279
  , EntryDate datetime not null comment '?o?^???t'
280
  , UpdateDate datetime not null comment '?X?V???t'
281 198 h-you
  , constraint bk_estimatedatabody_PKC primary key (SaveDate,ConstructionCode,PageCount)
282 271 h-you
) comment '??Z????y?[?W?f?[?^?y???p?z' ;
283 84 h-you
284 271 h-you
-- ??Z????f?[?^????y???p?z
285 325 h-you
drop table if exists bk_estimatedatadetail cascade;
286 84 h-you
287 198 h-you
create table bk_estimatedatadetail (
288 271 h-you
  SaveDate datetime not null comment '?????t'
289
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
290
  , PageCount decimal(4,0) unsigned not null comment '?y?[?W???'
291
  , LineCount decimal(3,0) unsigned not null comment '?s???'
292
  , DataType decimal(1,0) not null comment '?f?[?^???'
293
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
294
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
295
  , SpecCode decimal(5,0) unsigned not null comment '???L?['
296
  , ItemName varchar(120) comment '??????'
297
  , SpecName varchar(120) comment '???^?i???E?`??E???@'
298
  , Unitcount decimal(8,2) not null comment '????'
299
  , UnitName varchar(30) comment '?P?????'
300
  , UnitPrice decimal(9,2) not null comment '?P??'
301
  , LineTotal decimal(12,0) not null comment '???z'
302
  , note varchar(60) comment '???l'
303
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
304
  , MyExpensesFlg decimal(1,0) not null comment '????o??t???O'
305
  , InputFlg decimal(1,0) comment '????t???O'
306
  , EntryDate datetime not null comment '?o?^???t'
307
  , UpdateDate datetime not null comment '?X?V???t'
308 198 h-you
  , constraint bk_estimatedatadetail_PKC primary key (SaveDate,ConstructionCode,PageCount,LineCount)
309 271 h-you
) comment '??Z????f?[?^????y???p?z' ;
310 84 h-you
311 271 h-you
-- ?@?l?i?}?X?^
312 325 h-you
drop table if exists businesstypemaster cascade;
313 84 h-you
314 198 h-you
create table businesstypemaster (
315 271 h-you
  BusinessTypeCode decimal(5,0) unsigned not null comment '?@?l?i?R?[?h'
316
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
317
  , BusinessTypeName varchar(100) not null comment '???'
318
  , EntryDate datetime not null comment '?o?^???t'
319
  , UpdateDate datetime not null comment '?X?V???t'
320 198 h-you
  , constraint businesstypemaster_PKC primary key (BusinessTypeCode)
321 271 h-you
) comment '?@?l?i?}?X?^' ;
322 198 h-you
323
create index BusinessTypeMaster_Index1
324
  on businesstypemaster(DisplayOrder);
325
326 332 h-you
-- ?S????????????f?[?^
327
drop table if exists chgchargedep cascade;
328
329
create table chgchargedep (
330
  PersonCode decimal(8,0) not null comment '?S????R?[?h'
331
  , StartDate date not null comment '?J?n?N????'
332
  , CompDate date not null comment '?I???N????'
333
  , DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
334
  , DepartmentName varchar(60) comment '??????'
335
  , EntryDate datetime not null comment '?o?^???t'
336
  , UpdateDate datetime not null comment '?X?V???t'
337
  , constraint chgchargedep_PKC primary key (PersonCode,StartDate)
338
) comment '?S????????????f?[?^' ;
339
340 271 h-you
-- ????????}?X?^
341 325 h-you
drop table if exists commoncostlarge cascade;
342 84 h-you
343 198 h-you
create table commoncostlarge (
344 271 h-you
  LargeCode decimal(5,0) unsigned not null comment '????L?['
345
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
346
  , LargeName 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 198 h-you
  , constraint commoncostlarge_PKC primary key (LargeCode)
352 271 h-you
) comment '????????}?X?^' ;
353 84 h-you
354 271 h-you
-- ?????H???A?}?X?^
355 325 h-you
drop table if exists commoncostlinkms cascade;
356 84 h-you
357 198 h-you
create table commoncostlinkms (
358 271 h-you
  LargeCode decimal(5,0) unsigned not null comment '????L?['
359
  , MiddleCode decimal(5,0) unsigned not null comment '??????L?['
360
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
361
  , EntryDate datetime comment '?o?^???t'
362
  , UpdateDate datetime comment '?X?V???t'
363 198 h-you
  , constraint commoncostlinkms_PKC primary key (LargeCode,MiddleCode,ItemCode)
364 271 h-you
) comment '?????H???A?}?X?^' ;
365 84 h-you
366 271 h-you
-- ?????????}?X?^
367 325 h-you
drop table if exists commoncostmiddle cascade;
368 84 h-you
369 198 h-you
create table commoncostmiddle (
370 271 h-you
  LargeCode decimal(5,0) unsigned not null comment '????L?['
371
  , MiddleCode decimal(5,0) unsigned not null comment '??????L?['
372
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
373
  , MiddleName varchar(50) not null comment '?????????'
374
  , CommentText varchar(120) comment '????????'
375
  , DeleteFlg decimal(1,0) not null comment '???t???O'
376
  , EntryDate datetime not null comment '?o?^???t'
377
  , UpdateDate datetime not null comment '?X?V???t'
378 198 h-you
  , constraint commoncostmiddle_PKC primary key (LargeCode,MiddleCode)
379 271 h-you
) comment '?????????}?X?^' ;
380 84 h-you
381 271 h-you
-- ?????????L?[?}?X?^
382 325 h-you
drop table if exists commoncostmiddlesearchword cascade;
383 84 h-you
384 198 h-you
create table commoncostmiddlesearchword (
385 271 h-you
  LargeCode decimal(5,0) unsigned not null comment '????L?['
386
  , MiddleCode decimal(5,0) unsigned not null comment '??????L?['
387
  , SeqNo decimal(5,0) unsigned not null comment '????'
388
  , SearchWord varchar(50) not null comment '????????'
389
  , EntryDate datetime not null comment '?o?^???t'
390
  , UpdateDate datetime not null comment '?X?V???t'
391 198 h-you
  , constraint commoncostmiddlesearchword_PKC primary key (LargeCode,MiddleCode,SeqNo)
392 271 h-you
) comment '?????????L?[?}?X?^' ;
393 84 h-you
394 271 h-you
-- ?\???H???A?}?X?^
395 325 h-you
drop table if exists componentlinkmaster cascade;
396 84 h-you
397 198 h-you
create table componentlinkmaster (
398 271 h-you
  ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
399
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
400
  , DisplayOrder decimal(5,0) unsigned comment '?\????'
401
  , EntryDate datetime not null comment '?o?^???t'
402
  , UpdateDate datetime not null comment '?X?V???t'
403 198 h-you
  , constraint componentlinkmaster_PKC primary key (ComponentCode,ItemCode)
404 271 h-you
) comment '?\???H???A?}?X?^' ;
405 84 h-you
406 198 h-you
create index ComponentLinkMaster_Index1
407
  on componentlinkmaster(ComponentCode);
408 84 h-you
409 198 h-you
create index ComponentLinkMaster_Index2
410
  on componentlinkmaster(ItemCode);
411 84 h-you
412 271 h-you
-- ?\???}?X?^
413 325 h-you
drop table if exists componentmaster cascade;
414 84 h-you
415 198 h-you
create table componentmaster (
416 271 h-you
  ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
417
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
418
  , ComponentName varchar(120) not null comment '?\??????'
419
  , SubItemsFlg decimal(1,0) comment '???????t???O'
420
  , DirectInputFlg decimal(1,0) comment '???????t???O'
421
  , MyExpensesFlg decimal(1,0) comment '????o??t???O'
422
  , DeleteFlg decimal(1,0) not null comment '???t???O'
423
  , EntryDate datetime not null comment '?o?^???t'
424
  , UpdateDate datetime not null comment '?X?V???t'
425 198 h-you
  , constraint componentmaster_PKC primary key (ComponentCode)
426 271 h-you
) comment '?\???}?X?^' ;
427 84 h-you
428 198 h-you
create index ComponentMaster_Index1
429
  on componentmaster(DisplayOrder);
430 84 h-you
431 271 h-you
-- ?\???H??????A?}?X?^
432 325 h-you
drop table if exists componenttotypemaster cascade;
433 84 h-you
434 198 h-you
create table componenttotypemaster (
435 271 h-you
  ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
436
  , TypeCode decimal(5,0) unsigned not null comment '?H?????R?[?h'
437
  , Dummy decimal(1,0) not null comment '?_?~?[????'
438
  , EntryDate datetime not null comment '?o?^???t'
439
  , UpdateDate datetime not null comment '?X?V???t'
440 198 h-you
  , constraint componenttotypemaster_PKC primary key (ComponentCode,TypeCode)
441 271 h-you
) comment '?\???H??????A?}?X?^' ;
442 84 h-you
443 198 h-you
create index ComponentToTypeMaster_Index1
444
  on componenttotypemaster(ComponentCode);
445 84 h-you
446 198 h-you
create index ComponentToTypeMaster_Index2
447
  on componenttotypemaster(TypeCode);
448 84 h-you
449 332 h-you
-- ?H???S???????f?[?^
450
drop table if exists constrchgcharge cascade;
451
452
create table constrchgcharge (
453
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
454
  , Division decimal(1,0) not null comment '????'
455
  , SeqNo smallint(5) unsigned not null comment '?A??'
456
  , DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
457
  , PersonCode decimal(8,0) not null comment '?S????R?[?h'
458
  , StartDate date comment '?S???J?n?N????'
459
  , CompDate date comment '?S???I???N????'
460
  , EntryDate datetime not null comment '?o?^???t'
461
  , UpdateDate datetime not null comment '?X?V???t'
462
  , constraint constrchgcharge_PKC primary key (ConstructionCode,Division,SeqNo)
463
) comment '?H???S???????f?[?^' ;
464
465 271 h-you
-- ?H????{???
466 325 h-you
drop table if exists constructionbaseinfo cascade;
467 84 h-you
468 198 h-you
create table constructionbaseinfo (
469 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
470
  , TyingFlg decimal(1,0) not null comment '?R?t?f?[?^?t???O'
471
  , JoinFlg decimal(1,0) not null comment '?????_??H???t???O'
472
  , ConstructionYear smallint(5) unsigned not null comment '?H???N?x'
473
  , ConstructionPeriod smallint(5) unsigned not null comment '?H??????'
474
  , RequestedDate date comment '??????'
475
  , EstimatesSubmitDeadline date comment '?????o????'
476
  , EstimatesSubmittedDate date comment '?????o??'
477
  , ProvisionalOrderDate date comment '?????'
478
  , OrderDate date comment '???'
479
  , OrderStartingDate date comment '?J?n?\???'
480
  , OrderCompletionDate date comment '?????\???'
481
  , PreparationStartDate date comment '?{?H?????J?n??'
482
  , ConstructionStartingDate date comment '?{?H?J?n??'
483
  , ConstructionCompletionDate date comment '?{?H??????'
484
  , NonOrderDate date comment '????'
485
  , OrdersDecisionPrice decimal(12,0) not null comment '??????????z'
486
  , OrdersDecisionPriceInTax decimal(12,0) not null comment '??????????z'
487 332 h-you
  , SalesDepCode decimal(5,0) unsigned not null comment '?c??S????????R?[?h'
488
  , SalesPersonCode decimal(8,0) unsigned not null comment '?c??S????R?[?h'
489
  , ConstrDepCode decimal(5,0) unsigned not null comment '?H???S????????R?[?h'
490
  , ConstructionPersonCode decimal(8,0) not null comment '?H???S????R?[?h'
491
  , ConstrSubDepCode decimal(5,0) unsigned not null comment '?H?????S????????R?[?h'
492
  , ConstrSubPersonCode decimal(8,0) not null comment '?H?????S????R?[?h'
493
  , ConstrInstrDepCode decimal(5,0) unsigned not null comment '?H???w?????????R?[?h'
494
  , ConstructionInstructor decimal(8,0) not null comment '?H???w?????R?[?h'
495 271 h-you
  , TransferConstruction decimal(8,0) not null comment '?H??????R?[?h'
496
  , TransferConstructionDate date comment '?H??????'
497 332 h-you
  , OrderersDivision decimal(5,0) not null comment '????????R?[?h'
498 271 h-you
  , OrderersCode decimal(5,0) unsigned not null comment '??????R?[?h'
499
  , EstimatesExpirationDate date comment '????L??????'
500
  , ConstructionPeriodStart date comment '?_??H???J?n??'
501
  , ConstructionPeriodEnd date comment '?_??H??????'
502
  , ConstructionPeriodStart2 date comment '?_??H???J?n?i???????j'
503
  , ConstructionPeriodEnd2 date comment '?_??H???????i???????j'
504
  , StartDate date comment '?H???J?n??'
505
  , EndDate date comment '?H???I????'
506
  , PurchaseOrderMailingDate date comment '???????X????'
507
  , PurchaseOrderReturnDate date comment '???????????'
508
  , PurchaseOrderReturnCheckDate date comment '??????????m?F??'
509
  , ConsumptionTaxFlg decimal(1,0) not null comment '?????t???O'
510
  , PrimeContractorFlg decimal(1,0) not null comment '?????t???O'
511
  , SalesCostFlg decimal(1,0) not null comment '?c??o?????t???O'
512
  , ConstructionStatusFlg decimal(2,0) not null comment '?H?????t???O'
513
  , ConstructionType decimal(5,0) not null comment '?H?????R?[?h'
514
  , EstimateType decimal(1,0) not null comment '??????'
515
  , BillingStartDate date not null comment '?????????J?n??'
516
  , BillingDate date not null comment '??????'
517
  , BillingSplitFlg decimal(1,0) not null comment '??????t???O'
518
  , BillingSendDate date comment '???????X??/??n????'
519
  , LedgerComplateDate date not null comment '?H????????????????t'
520 322 h-you
  , InspectPlanningDate date not null comment '?????\???'
521
  , InspectExecuteDate date not null comment '???????s??'
522
  , RevCompleteDate date not null comment '??????????????'
523 271 h-you
  , EntryDate datetime not null comment '?o?^???t'
524
  , UpdateDate datetime not null comment '?X?V???t'
525 198 h-you
  , constraint constructionbaseinfo_PKC primary key (ConstructionCode)
526 271 h-you
) comment '?H????{???' ;
527 84 h-you
528 198 h-you
create index BaseInfo_Index1
529
  on constructionbaseinfo(ConstructionStatusFlg);
530 84 h-you
531 198 h-you
create index BaseInfo_Index2
532
  on constructionbaseinfo(EstimateType);
533 84 h-you
534 198 h-you
create index BaseInfo_Index3
535
  on constructionbaseinfo(SalesPersonCode);
536 84 h-you
537 198 h-you
create index BaseInfo_Index4
538
  on constructionbaseinfo(ConstructionPersonCode);
539 84 h-you
540 198 h-you
create index BaseInfo_Index5
541
  on constructionbaseinfo(ConstructionInstructor);
542 84 h-you
543 198 h-you
create index BaseInfo_Index6
544
  on constructionbaseinfo(ConstructionPeriod);
545 84 h-you
546 271 h-you
-- ?H????{????
547 325 h-you
drop table if exists constructionbaseinfodetail cascade;
548 84 h-you
549 198 h-you
create table constructionbaseinfodetail (
550 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
551 332 h-you
  , DetailNo decimal(3,0) not null comment '??????'
552 322 h-you
  , DetailString varchar(300) comment '??????e'
553 271 h-you
  , EntryDate datetime not null comment '?o?^???t'
554
  , UpdateDate datetime not null comment '?X?V???t'
555 198 h-you
  , constraint constructionbaseinfodetail_PKC primary key (ConstructionCode,DetailNo)
556 271 h-you
) comment '?H????{????' ;
557 84 h-you
558 198 h-you
create index BaseInfoDetail_Idx1
559
  on constructionbaseinfodetail(ConstructionCode);
560 84 h-you
561 198 h-you
create index BaseInfoDetail_Idx2
562
  on constructionbaseinfodetail(DetailNo);
563 84 h-you
564 271 h-you
-- ?H???{?H?\?Z?f?[?^
565 325 h-you
drop table if exists constructionbudget cascade;
566 84 h-you
567 198 h-you
create table constructionbudget (
568 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
569
  , CreatorCode decimal(8,0) not null comment '????R?[?h'
570
  , CreatorName varchar(60) comment '?????'
571
  , CreatorCosts decimal(11,0) not null comment '??????^'
572
  , AssistantCode decimal(8,0) not null comment '???S????R?[?h'
573
  , AssistantName varchar(60) comment '???S?????'
574
  , AssistantCosts decimal(11,0) not null comment '???S??????^'
575
  , InstructorCode decimal(8,0) not null comment '?H???w?????R?[?h'
576
  , InstructorName varchar(60) comment '?H???w??????'
577
  , InstructorCosts decimal(11,0) not null comment '?H???w???????^'
578
  , CreateDate date not null comment '????'
579
  , ConstructionTimes decimal(5,2) not null comment '?H???i?P??E???j'
580
  , ConstructionStart date not null comment '?_??H???J?n'
581
  , ConstructionEnd date not null comment '?_??H??????'
582
  , InstructorTimes decimal(5,2) not null comment '?w???????????'
583
  , SalaryFlg decimal(1,0) not null comment '???^?U????'
584
  , SalaryDays decimal(4,0) not null comment '?U??????'
585
  , A_SalaryFlg decimal(1,0) not null comment '???S??????^?U????'
586
  , A_SalaryDays decimal(4,0) not null comment '???S????U??????'
587
  , I_SalaryFlg decimal(1,0) not null comment '?w???????^?U????'
588
  , I_SalaryDays decimal(4,0) not null comment '?w?????U??????'
589
  , OrdersDecisionPrice decimal(12,0) not null comment '??????????z'
590
  , EntryDate datetime not null comment '?o?^???t'
591
  , UpdateDate datetime not null comment '?X?V???t'
592 198 h-you
  , constraint constructionbudget_PKC primary key (ConstructionCode)
593 271 h-you
) comment '?H???{?H?\?Z?f?[?^' ;
594 84 h-you
595 271 h-you
-- ?H???{?H?\?Z?f?[?^????
596 325 h-you
drop table if exists constructionbudgetdetail cascade;
597 84 h-you
598 198 h-you
create table constructionbudgetdetail (
599 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
600
  , GroupCount decimal(2,0) unsigned not null comment '?O???[?v???'
601
  , LineCount decimal(3,0) unsigned not null comment '?s???'
602
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
603
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
604
  , FirstString varchar(120) comment '???????'
605
  , SecondString varchar(120) comment '?H?????e'
606
  , CompanyType decimal(1,0) not null comment '??????R?[?h?^?C?v'
607
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
608
  , CompanyName varchar(120) comment '?????????'
609
  , EstimatePrice decimal(12,0) not null comment '??Z????????z'
610
  , NegotiationPrice decimal(12,0) not null comment '??Z????????z'
611
  , OrderDesiredAmount decimal(12,0) not null comment '??????]???z'
612
  , ExecutionAmount decimal(12,0) not null comment '???s???z'
613
  , AmountConfigRate decimal(5,2) not null comment '???z?\????'
614
  , NegotiateFlg decimal(1,0) not null comment '?????????t???O'
615
  , EntryDate datetime not null comment '?o?^???t'
616
  , UpdateDate datetime not null comment '?X?V???t'
617 198 h-you
  , constraint constructionbudgetdetail_PKC primary key (ConstructionCode,GroupCount,LineCount)
618 271 h-you
) comment '?H???{?H?\?Z?f?[?^????' ;
619 84 h-you
620 271 h-you
-- ?H??}?X?^
621 325 h-you
drop table if exists constructionitemmaster cascade;
622 84 h-you
623 198 h-you
create table constructionitemmaster (
624 271 h-you
  ItemCode decimal(5,0) unsigned not null comment '?H??L?['
625
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
626
  , ItemName varchar(120) not null comment '?H????'
627
  , SubItemsFlg decimal(1,0) comment '???????t???O'
628
  , MyExpensesFlg decimal(1,0) not null comment '????o??t???O'
629
  , DeleteFlg decimal(1,0) not null comment '???t???O'
630
  , EntryDate datetime not null comment '?o?^???t'
631
  , UpdateDate datetime not null comment '?X?V???t'
632 198 h-you
  , constraint constructionitemmaster_PKC primary key (ItemCode)
633 271 h-you
) comment '?H??}?X?^' ;
634 84 h-you
635 271 h-you
-- ?H???????f?[?^
636 325 h-you
drop table if exists constructionledger cascade;
637 84 h-you
638 198 h-you
create table constructionledger (
639 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
640
  , ConstructionPeriod decimal(4,0) unsigned not null comment '?????'
641
  , CreatorCode decimal(8,0) comment '????R?[?h'
642
  , CreatorName varchar(60) comment '?????'
643
  , CreateDate date not null comment '????'
644
  , ConstructionTimes decimal(5,2) not null comment '?H???i?P??E???j'
645
  , ConstructionStart date not null comment '?_??H???J?n'
646
  , ConstructionEnd date not null comment '?_??H??????'
647
  , OrdersDecisionPrice decimal(14,0) not null comment '??????????z'
648
  , CompanyExpenses decimal(10,0) not null comment '???o???v'
649
  , DepartmentExpenses decimal(10,0) not null comment '?????o???v'
650
  , SalesExpenses decimal(10,0) not null comment '?c??o???v'
651
  , TotalPayment decimal(10,0) not null comment '???x???z'
652
  , GrossProfit decimal(10,0) not null comment '?e??'
653
  , Allowance decimal(10,0) not null comment '???^'
654
  , NetProfit decimal(10,0) not null comment '?????v'
655
  , ComplateFlg decimal(1,0) not null comment '????????t???O'
656
  , IntegrationFlg decimal(1,0) not null comment '????z??Z?t???O'
657
  , EntryDate datetime not null comment '?o?^???t'
658
  , UpdateDate datetime not null comment '?X?V???t'
659 198 h-you
  , constraint constructionledger_PKC primary key (ConstructionCode)
660 271 h-you
) comment '?H???????f?[?^' ;
661 84 h-you
662 271 h-you
-- ?H??????????f?[?^
663 325 h-you
drop table if exists constructionledgerdetail cascade;
664 84 h-you
665 198 h-you
create table constructionledgerdetail (
666 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
667
  , GroupCount decimal(2,0) unsigned not null comment '?O???[?v???'
668 302 h-you
  , LineCount decimal(4,0) unsigned not null comment '?s???'
669 271 h-you
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
670
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
671
  , FirstString varchar(120) comment '???????'
672
  , SecondString varchar(120) comment '?H?????e'
673
  , CompanyType decimal(1,0) not null comment '??????R?[?h?^?C?v'
674
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
675
  , CompanyName varchar(120) comment '?????????'
676
  , EstimatePrice decimal(12,0) not null comment '?\?Z?i????j???z'
677
  , ExecutionAmount decimal(12,0) not null comment '???s???z'
678
  , AmountConfigRate decimal(5,2) not null comment '???z?\????'
679
  , PaymentBurden decimal(12,0) not null comment '?x????U?z'
680
  , FixDataFlg decimal(1,0) not null comment '???f?[?^?t???O'
681
  , IndependentFlg decimal(1,0) not null comment '????f?[?^?t???O'
682
  , FluctuationFlg decimal(1,0) not null comment '?????f?[?^?t???O'
683
  , SalaryFlg decimal(1,0) not null comment '???^?U????'
684
  , SalaryDays decimal(4,0) not null comment '???^?U??????'
685
  , OperatingFlg decimal(1,0) not null comment '?S?????t???O'
686
  , SourceCode decimal(10,0) unsigned not null comment '???H?????'
687
  , JoinTitleFlg decimal(1,0) not null comment '?H??????^?C?g??'
688
  , SalaryOnRegist decimal(12,0) not null comment '?o?^?????z???^'
689
  , PurchaseOrderFlg decimal(2,0) not null comment '?????????s?t???O'
690 302 h-you
  , DetailCount decimal(4,0) unsigned not null comment '??????'
691 271 h-you
  , EntryDate datetime not null comment '?o?^???t'
692
  , UpdateDate datetime not null comment '?X?V???t'
693 198 h-you
  , constraint constructionledgerdetail_PKC primary key (ConstructionCode,GroupCount,LineCount)
694 271 h-you
) comment '?H??????????f?[?^' ;
695 84 h-you
696 198 h-you
create index LedgerDetail_Index01
697
  on constructionledgerdetail(ConstructionCode);
698 84 h-you
699 198 h-you
create index LedgerDetail_Index02
700
  on constructionledgerdetail(GroupCount);
701 84 h-you
702 198 h-you
create index LedgerDetail_Index03
703 302 h-you
  on constructionledgerdetail(LineCount);
704
705
create index LedgerDetail_Index04
706 198 h-you
  on constructionledgerdetail(SourceCode);
707 84 h-you
708 302 h-you
create index LedgerDetail_Index05
709
  on constructionledgerdetail(DetailCount);
710
711 271 h-you
-- ?H?????????s?f?[?^
712 325 h-you
drop table if exists constructionledgerexcute cascade;
713 84 h-you
714 198 h-you
create table constructionledgerexcute (
715 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
716
  , GroupCount decimal(2,0) unsigned not null comment '?O???[?v???'
717 302 h-you
  , LineCount decimal(4,0) unsigned not null comment '?s???'
718 271 h-you
  , ColumnCount decimal(3,0) not null comment '????'
719
  , PaymentAmount decimal(12,0) not null comment '?x?????z'
720
  , TargetMonth date not null comment '???N??'
721
  , EntryDate datetime not null comment '?o?^???t'
722
  , UpdateDate datetime not null comment '?X?V???t'
723 198 h-you
  , constraint constructionledgerexcute_PKC primary key (ConstructionCode,GroupCount,LineCount,ColumnCount)
724 271 h-you
) comment '?H?????????s?f?[?^' ;
725 84 h-you
726 198 h-you
create index LedgerExcute_Index1
727
  on constructionledgerexcute(ConstructionCode,TargetMonth,GroupCount,LineCount);
728 84 h-you
729 271 h-you
-- ?H???????N???
730 325 h-you
drop table if exists constructionlink cascade;
731 84 h-you
732 198 h-you
create table constructionlink (
733 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
734
  , FluctuationCode decimal(10,0) not null comment '?q?H?????'
735
  , LinkType decimal(1,0) not null comment '?????N???'
736
  , EntryDate datetime not null comment '?o?^???t'
737
  , UpdateDate datetime not null comment '?X?V???t'
738 198 h-you
  , constraint constructionlink_PKC primary key (ConstructionCode,FluctuationCode)
739 271 h-you
) comment '?H???????N???' ;
740 101 h-you
741 198 h-you
create index ConstructionLink_Index1
742
  on constructionlink(ConstructionCode);
743 101 h-you
744 198 h-you
create index ConstructionLink_Index2
745
  on constructionlink(FluctuationCode);
746 84 h-you
747 198 h-you
create index ConstructionLink_Index3
748
  on constructionlink(LinkType);
749 84 h-you
750 271 h-you
-- ?H????????
751 325 h-you
drop table if exists constructionmaterialinfo cascade;
752 84 h-you
753 198 h-you
create table constructionmaterialinfo (
754 271 h-you
  CONSTRUCTIONCODE int(10) unsigned default 0 not null comment '?H?????'
755
  , MATERIALITEMCODE smallint(5) unsigned default 0 not null comment '????i??R?[?h'
756 277 h-you
  , PROCESSDATE datetime default '0000-00-00 00:00:00' not null comment '?????N????'
757 271 h-you
  , RENTCOUNT smallint(5) unsigned comment '??o??'
758
  , REPAYCOUNT smallint(5) unsigned comment '??p??'
759 277 h-you
  , JUNKCOUNT smallint(5) unsigned comment '?j????'
760 271 h-you
  , COMPLETEFLG tinyint(3) unsigned comment '?????t???O'
761
  , ENTRYDATE datetime comment '?o?^???t'
762
  , UPDATEDATE datetime comment '?X?V???t'
763 277 h-you
  , constraint constructionmaterialinfo_PKC primary key (CONSTRUCTIONCODE,MATERIALITEMCODE,PROCESSDATE)
764 271 h-you
) comment '?H????????' ;
765 84 h-you
766 271 h-you
-- ????i?????t?f?[?^
767 325 h-you
drop table if exists constructionprogressdate cascade;
768 84 h-you
769 198 h-you
create table constructionprogressdate (
770 271 h-you
  ConstructionCode decimal(10,0) not null comment '?H?????'
771
  , ConstructionStatusFlg decimal(2,0) not null comment '???H?????'
772
  , PreviousStatusFlg decimal(2,0) comment '??X?O???'
773
  , ChangeDate datetime not null comment '?????t'
774
  , ChangePersonCode decimal(8,0) not null comment '???S????'
775
  , EntryDate datetime not null comment '?o?^???t'
776
  , UpdateDate datetime not null comment '?X?V???t'
777 198 h-you
  , constraint constructionprogressdate_PKC primary key (ConstructionCode,ConstructionStatusFlg)
778 271 h-you
) comment '????i?????t?f?[?^' ;
779 84 h-you
780 271 h-you
-- ???}?X?^
781 325 h-you
drop table if exists constructionspecmaster cascade;
782 84 h-you
783 198 h-you
create table constructionspecmaster (
784 271 h-you
  ItemCode decimal(5,0) unsigned not null comment '?H??L?['
785
  , SpecCode decimal(5,0) unsigned not null comment '???L?['
786
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
787
  , ItemName varchar(120) comment '??????'
788
  , SpecName varchar(120) comment '??????'
789
  , UnitName varchar(30) comment '?P?????'
790
  , UnitPrice decimal(9,2) not null comment '?P??'
791
  , DeleteFlg decimal(1,0) not null comment '???t???O'
792
  , EntryDate datetime not null comment '?o?^???t'
793
  , UpdateDate datetime not null comment '?X?V???t'
794 198 h-you
  , constraint constructionspecmaster_PKC primary key (ItemCode,SpecCode)
795 271 h-you
) comment '???}?X?^' ;
796 84 h-you
797 198 h-you
create index ConstructionSpecMaster_Index1
798
  on constructionspecmaster(DisplayOrder);
799 84 h-you
800 271 h-you
-- ???P???}?X?^
801 325 h-you
drop table if exists constructionspecunitprice cascade;
802 84 h-you
803 198 h-you
create table constructionspecunitprice (
804 271 h-you
  ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
805
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
806
  , SpecCode decimal(5,0) unsigned not null comment '???L?['
807
  , ConstructionTypeCode mediumint(8) unsigned not null comment '?H?????R?[?h'
808
  , UnitPrice decimal(9,2) not null comment '?P??'
809
  , EntryDate datetime not null comment '?o?^???t'
810
  , UpdateDate datetime not null comment '?X?V???t'
811 198 h-you
  , constraint constructionspecunitprice_PKC primary key (ComponentCode,ItemCode,SpecCode,ConstructionTypeCode)
812 271 h-you
) comment '???P???}?X?^' ;
813 84 h-you
814 271 h-you
-- ?H?????}?X?^
815 325 h-you
drop table if exists constructiontypemaster cascade;
816 84 h-you
817 198 h-you
create table constructiontypemaster (
818 271 h-you
  TypeCode decimal(5,0) unsigned not null comment '?H?????R?[?h'
819
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
820
  , NameString varchar(100) not null comment '????'
821
  , PublicFlg decimal(1,0) not null comment '?H?????t???O'
822
  , SecRank decimal(1,0) not null comment '?????????N'
823
  , ExpensesLink decimal(1,0) not null comment '?o??g?p??'
824
  , DeleteFlg decimal(1,0) not null comment '???t???O'
825
  , EntryDate datetime not null comment '?o?^???t'
826
  , UpdateDate datetime not null comment '?X?V???t'
827 198 h-you
  , constraint constructiontypemaster_PKC primary key (TypeCode)
828 271 h-you
) comment '?H?????}?X?^' ;
829 84 h-you
830 271 h-you
-- ?S??????o??f?[?^
831 325 h-you
drop table if exists costdataofperson cascade;
832 84 h-you
833 198 h-you
create table costdataofperson (
834 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
835
  , ActionDate date not null comment '?????t'
836
  , DataType decimal(1,0) not null comment '?f?[?^??'
837
  , DataAddCount decimal(5,0) unsigned not null comment '?f?[?^??????'
838
  , TargetMonth varchar(7) not null comment '???N??'
839
  , ConstructionCode decimal(10,0) unsigned comment '?H???R?[?h'
840
  , SuppliersCode decimal(5,0) unsigned not null comment '?x????R?[?h'
841
  , SuppliersName varchar(120) comment '?x??????'
842
  , PaymentContent varchar(60) comment '?x?????e'
843
  , PaymentType decimal(1,0) not null comment '?x?????@?t???O'
844
  , EntryPrice decimal(12,0) not null comment '???z?i????j'
845
  , EntryPriceInTax decimal(12,0) not null comment '???z?i????j'
846
  , SlipNumber varchar(12) comment '?`?[???'
847
  , ComplateFlg decimal(1,0) not null comment '???????t???O'
848
  , ApprovalFlg decimal(1,0) not null comment '???F?t???O'
849
  , EntryDate datetime not null comment '?o?^???t'
850
  , UpdateDate datetime not null comment '?X?V???t'
851 198 h-you
  , constraint costdataofperson_PKC primary key (PersonCode,ActionDate,DataType,DataAddCount)
852 271 h-you
) comment '?S??????o??f?[?^' ;
853 84 h-you
854 198 h-you
create index CostDataOfPerson_Index1
855
  on costdataofperson(TargetMonth);
856 84 h-you
857 198 h-you
create index CostDataOfPerson_Index2
858
  on costdataofperson(ConstructionCode);
859 84 h-you
860 271 h-you
-- ??????o?^?\???f?[?^
861 325 h-you
drop table if exists costomerregist cascade;
862 84 h-you
863 198 h-you
create table costomerregist (
864 332 h-you
  CreatePersonCode decimal(8,0) unsigned not null comment '?\??????'
865 271 h-you
  , CreateDate date not null comment '????'
866
  , SeqNo decimal(2,0) not null comment '?L?[?A??'
867
  , DataMode decimal(1,0) not null comment '?f?[?^??'
868
  , SourceCotegory decimal(5,0) unsigned not null comment '???????'
869
  , SourceCode decimal(5,0) unsigned not null comment '??????R?[?h'
870
  , PetitionPeriod decimal(4,0) unsigned not null comment '?????'
871
  , OrderFlg decimal(1,0) not null comment '?@?l?c??E??l?t???O'
872
  , CorporateStatusName varchar(100) comment '?@?l?i????'
873
  , CorporateStatusPoint decimal(1,0) comment '?@?l?i?????u'
874
  , OrderersName1 varchar(60) not null comment '???????1'
875
  , OrderersName2 varchar(60) comment '????????Q'
876
  , DepartmentName varchar(60) comment '??????'
877 332 h-you
  , PersonName varchar(60) comment '?S?????'
878 271 h-you
  , ZipCode varchar(8) comment '?X????'
879
  , Address1 varchar(60) comment '?Z???P'
880
  , Address2 varchar(60) comment '?Z??2'
881
  , Address3 varchar(60) comment '?Z??3'
882
  , PhoneNumber varchar(13) comment '?d?b???'
883
  , FaxNumber varchar(13) comment 'FAX???'
884
  , MailAddress varchar(257) comment '???[???A?h???X'
885
  , Note varchar(300) comment '???l'
886
  , OrderCotegory decimal(5,0) unsigned not null comment '???????'
887
  , OrderDate date not null comment '?\????'
888
  , OrderNo decimal(2,0) unsigned not null comment '?\????t???'
889 332 h-you
  , CreateDepartmentCode decimal(5,0) unsigned not null comment '?\???????R?[?h'
890
  , CreateDepartmentName varchar(60) comment '?\????????'
891 271 h-you
  , EntryDate datetime not null comment '?o?^???t'
892
  , UpdateDate datetime not null comment '?X?V???t'
893 332 h-you
  , constraint costomerregist_PKC primary key (CreatePersonCode,CreateDate,SeqNo)
894 271 h-you
) comment '??????o?^?\???f?[?^' ;
895 84 h-you
896 198 h-you
create index CostomerRegist_Index1
897
  on costomerregist(PetitionPeriod);
898 84 h-you
899 332 h-you
create index CostomerRegist_Index2
900
  on costomerregist(CreatePersonCode);
901
902
create index CostomerRegist_Index3
903
  on costomerregist(CreateDepartmentCode);
904
905 271 h-you
-- ????f?[?^
906 325 h-you
drop table if exists dailydataconstruction cascade;
907 84 h-you
908 198 h-you
create table dailydataconstruction (
909 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
910
  , DailyDataDate date not null comment '???????'
911
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
912
  , Weather varchar(60) comment '?V?C'
913
  , EntryDate datetime not null comment '?o?^???t'
914
  , UpdateDate datetime not null comment '?X?V???t'
915 198 h-you
  , constraint dailydataconstruction_PKC primary key (PersonCode,DailyDataDate,ConstructionCode)
916 271 h-you
) comment '????f?[?^' ;
917 84 h-you
918 198 h-you
create index DailyDataConstruction_Index1
919
  on dailydataconstruction(PersonCode);
920 101 h-you
921 198 h-you
create index DailyDataConstruction_Index2
922
  on dailydataconstruction(DailyDataDate);
923 101 h-you
924 198 h-you
create index DailyDataConstruction_Index3
925
  on dailydataconstruction(ConstructionCode);
926 84 h-you
927 271 h-you
-- ????f?[?^ (????)
928 325 h-you
drop table if exists dailydatadetail cascade;
929 84 h-you
930 198 h-you
create table dailydatadetail (
931 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
932
  , DailyDataDate date not null comment '???????'
933
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
934
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
935
  , JobCategoryCode decimal(5,0) not null comment '?E??L?['
936
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
937
  , TodayHeadCount decimal(4,1) not null comment '?????l????'
938
  , TotalHeadCount decimal(5,1) not null comment '??v?l????'
939
  , TodayWork varchar(100) comment '?????????e'
940
  , NextdayWork varchar(100) comment '?????????e'
941
  , NextdayHeadCount decimal(4,1) not null comment '?????l????'
942
  , EntryDate datetime not null comment '?o?^???t'
943
  , UpdateDate datetime not null comment '?X?V???t'
944 198 h-you
  , constraint dailydatadetail_PKC primary key (PersonCode,DailyDataDate,ConstructionCode,SeqNo)
945 271 h-you
) comment '????f?[?^ (????)' ;
946 84 h-you
947 198 h-you
create index DailyDataDetail_Index
948
  on dailydatadetail(PersonCode,DailyDataDate,ConstructionCode);
949 84 h-you
950 271 h-you
-- ????f?[?^ (??????)
951 325 h-you
drop table if exists dailydatafield cascade;
952 84 h-you
953 198 h-you
create table dailydatafield (
954 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
955
  , DailyDataDate date not null comment '???????'
956
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
957
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
958
  , PatrolTime datetime not null comment '?????'
959
  , ContentsText varchar(200) comment '???e'
960
  , EntryDate datetime not null comment '?o?^???t'
961
  , UpdateDate datetime not null comment '?X?V???t'
962 198 h-you
  , constraint dailydatafield_PKC primary key (PersonCode,DailyDataDate,ConstructionCode,SeqNo)
963 271 h-you
) comment '????f?[?^ (??????)' ;
964 84 h-you
965 198 h-you
create index DailyDataField_Index
966
  on dailydatafield(PersonCode,DailyDataDate,ConstructionCode);
967 84 h-you
968 271 h-you
-- ????f?[?^ (????)
969 325 h-you
drop table if exists dailydatamaterials cascade;
970 84 h-you
971 198 h-you
create table dailydatamaterials (
972 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
973
  , DailyDataDate date not null comment '???????'
974
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
975
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
976
  , Materials varchar(100) comment '?????'
977
  , Quantity varchar(100) comment '????'
978
  , Production varchar(100) comment '??????'
979
  , Delivery varchar(100) comment '?[?????'
980
  , QualityControl varchar(100) comment '?i?????????'
981
  , EntryDate datetime not null comment '?o?^???t'
982
  , UpdateDate datetime not null comment '?X?V???t'
983 198 h-you
  , constraint dailydatamaterials_PKC primary key (PersonCode,DailyDataDate,ConstructionCode,SeqNo)
984 271 h-you
) comment '????f?[?^ (????)' ;
985 84 h-you
986 198 h-you
create index DailyDataMaterials_Index
987
  on dailydatamaterials(PersonCode,DailyDataDate,ConstructionCode);
988 84 h-you
989 271 h-you
-- ????f?[?^ (??????w??)
990 325 h-you
drop table if exists dailydatasubcontractors cascade;
991 84 h-you
992 198 h-you
create table dailydatasubcontractors (
993 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
994
  , DailyDataDate date not null comment '???????'
995
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
996
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
997
  , Attendee varchar(100) comment '?o???'
998
  , ContentsText varchar(200) comment '???e'
999
  , EntryDate datetime not null comment '?o?^???t'
1000
  , UpdateDate datetime not null comment '?X?V???t'
1001 198 h-you
  , constraint dailydatasubcontractors_PKC primary key (PersonCode,DailyDataDate,ConstructionCode,SeqNo)
1002 271 h-you
) comment '????f?[?^ (??????w??)' ;
1003 84 h-you
1004 198 h-you
create index DailyDataSubcontractors_Index
1005
  on dailydatasubcontractors(PersonCode,DailyDataDate,ConstructionCode);
1006 84 h-you
1007 271 h-you
-- ????f?[?^ (???)
1008 325 h-you
drop table if exists dailydatavehicles cascade;
1009 84 h-you
1010 198 h-you
create table dailydatavehicles (
1011 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
1012
  , DailyDataDate date not null comment '???????'
1013
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1014
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
1015
  , Model varchar(100) comment '?@??'
1016
  , Performance varchar(100) comment '???\'
1017
  , Owner varchar(100) comment '???L???'
1018
  , Driver varchar(100) comment '?????^?]??'
1019
  , StartWorkingTime datetime not null comment '??????J?n'
1020
  , EndWorkingTime datetime not null comment '??????I??'
1021
  , EntryDate datetime not null comment '?o?^???t'
1022
  , UpdateDate datetime not null comment '?X?V???t'
1023 198 h-you
  , constraint dailydatavehicles_PKC primary key (PersonCode,DailyDataDate,ConstructionCode,SeqNo)
1024 271 h-you
) comment '????f?[?^ (???)' ;
1025 84 h-you

1026 198 h-you
create index DailyDataVehicles_Index
1027
  on dailydatavehicles(PersonCode,DailyDataDate,ConstructionCode);
1028 84 h-you

1029 271 h-you
-- ???}?X?^
1030 325 h-you
drop table if exists daymaster cascade;
1031 84 h-you

1032 198 h-you
create table daymaster (
1033 271 h-you
  days smallint(6) not null comment '??'
1034
) comment '???}?X?^' ;
1035 84 h-you

1036 198 h-you
create index day_Index1
1037
  on daymaster(days);
1038 84 h-you

1039 271 h-you
-- ?????}?X?^
1040 325 h-you
drop table if exists deadlinemaster cascade;
1041 106 bit

1042
create table deadlinemaster (
1043 271 h-you
  LABOURKIND decimal(1,0) default '0' not null comment '??????'
1044
  , DEADLINE decimal(2,0) comment '????'
1045
  , PAYDAY decimal(2,0) comment '?x????'
1046
  , NOTE varchar(120) comment '???l'
1047
  , DELETEFLG decimal(1,0) comment '???t???O'
1048
  , ENTRYDATE datetime comment '?o?^???t'
1049
  , UPDATEDATE datetime comment '?X?V???t'
1050 106 bit
  , constraint deadlinemaster_PKC primary key (LABOURKIND)
1051 271 h-you
) comment '?????}?X?^' ;
1052 106 bit

1053 271 h-you
-- ?????o???}?X?^
1054 325 h-you
drop table if exists departmentexpensesmaster cascade;
1055 198 h-you

1056
create table departmentexpensesmaster (
1057 271 h-you
  DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
1058
  , ExpensesPeriod smallint(6) not null comment '?????'
1059
  , NameCode decimal(5,0) unsigned not null comment '?o????R?[?h'
1060
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
1061
  , ExpensesRaito decimal(4,2) not null comment '?o??'
1062
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1063
  , EntryDate datetime not null comment '?o?^???t'
1064
  , UpdateDate datetime not null comment '?X?V???t'
1065 198 h-you
  , constraint departmentexpensesmaster_PKC primary key (DepartmentCode,ExpensesPeriod,NameCode)
1066 271 h-you
) comment '?????o???}?X?^' ;
1067 198 h-you

1068 271 h-you
-- ?????}?X?^
1069 325 h-you
drop table if exists departmentmaster cascade;
1070 198 h-you

1071
create table departmentmaster (
1072 271 h-you
  DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
1073
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
1074
  , DepartmentString varchar(100) not null comment '??????'
1075
  , ActionScheduleFlg decimal(1,0) not null comment '?s???\??\???t???O'
1076
  , StaffAssignFlg decimal(1,0) not null comment '?l???z?u?\???t???O'
1077
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1078
  , EntryDate datetime not null comment '?o?^???t'
1079
  , UpdateDate datetime not null comment '?X?V???t'
1080 198 h-you
  , constraint departmentmaster_PKC primary key (DepartmentCode)
1081 271 h-you
) comment '?????}?X?^' ;
1082 198 h-you

1083
create index DepartmentMaster_index1
1084
  on departmentmaster(DisplayOrder);
1085

1086 271 h-you
-- ?????m?F???F?f?[?^
1087 325 h-you
drop table if exists depositapprovalinfo cascade;
1088 198 h-you

1089 106 bit
create table depositapprovalinfo (
1090 271 h-you
  ORDERERSDIVISION decimal(5,0) not null comment '???????'
1091
  , ORDERERSCODE decimal(5,0) not null comment '??????R?[?h'
1092
  , TARGETDATE decimal(6,0) not null comment '???N??'
1093
  , SEQNO decimal(3,0) not null comment '?A??'
1094
  , LINECOUNT decimal(3,0) not null comment '?s???'
1095
  , APPROVALNO decimal(3,0) not null comment '???F????'
1096
  , APPROVALPERSON decimal(8,0) comment '???F??R?[?h'
1097
  , APPROVALPERSONNAME varchar(20) comment '???F???'
1098
  , APPROVALAUTHORITY decimal(1,0) comment '???F??????'
1099
  , APPROVALDATE date comment '???F???t'
1100
  , ENTRYDATE datetime comment '?o?^???t'
1101
  , UPDATEDATE datetime comment '?X?V???t'
1102 106 bit
  , constraint depositapprovalinfo_PKC primary key (ORDERERSDIVISION,ORDERERSCODE,TARGETDATE,SEQNO,LINECOUNT,APPROVALNO)
1103 271 h-you
) comment '?????m?F???F?f?[?^' ;
1104 106 bit

1105 271 h-you
-- ?????f?[?^
1106 325 h-you
drop table if exists depositdata cascade;
1107 106 bit

1108
create table depositdata (
1109 271 h-you
  ORDERERSDIVISION decimal(5,0) not null comment '???????'
1110
  , ORDERERSCODE decimal(5,0) not null comment '??????R?[?h'
1111
  , TARGETDATE decimal(6,0) not null comment '???N??'
1112
  , SEQNO decimal(3,0) not null comment '?A??'
1113
  , BUSINESSPERIOD decimal(4,0) comment '?c???'
1114
  , DEPOSITDATE date comment '??????'
1115
  , DEPOSITAMOUNT decimal(12,0) comment '???????z'
1116
  , DEPOSITAMOUNTCASH decimal(10,0) comment '???????z?i?????j'
1117
  , DEPOSITAMOUNTBILL decimal(10,0) comment '???????z?i??`?j'
1118
  , DEPOSITPERSONCODE decimal(8,0) not null comment '?????S????R?[?h'
1119
  , NOTE varchar(120) comment '???l'
1120
  , ENTRYDATE datetime comment '?o?^???t'
1121
  , UPDATEDATE datetime comment '?X?V???t'
1122 106 bit
  , constraint depositdata_PKC primary key (ORDERERSDIVISION,ORDERERSCODE,TARGETDATE,SEQNO)
1123 271 h-you
) comment '?????f?[?^' ;
1124 106 bit

1125 271 h-you
-- ????????f?[?^
1126 325 h-you
drop table if exists depositdatadetail cascade;
1127 106 bit

1128
create table depositdatadetail (
1129 271 h-you
  ORDERERSDIVISION decimal(5,0) not null comment '???????'
1130
  , ORDERERSCODE decimal(5,0) not null comment '??????R?[?h'
1131
  , TARGETDATE decimal(6,0) not null comment '???N??'
1132
  , REQUESTNO decimal(10,0) not null comment '????No'
1133
  , ORDERNO decimal(2,0) comment '??t???'
1134
  , DEPOSITAMOUNT decimal(10,0) comment '???????z'
1135
  , DISCOUNTAMOUNT decimal(10,0) comment '?l???????z'
1136
  , CNSTRPRICE decimal(10,0) comment '?????'
1137
  , FEES decimal(10,0) comment '????'
1138
  , OTHERADJUSTMENTS decimal(10,0) comment '?????'
1139
  , DIFFERENCEAMOUNT decimal(10,0) comment '????'
1140
  , CONFIRMATIONPERSONCODE decimal(8,0) comment '?m?F?S????R?[?h'
1141
  , CONFIRMATIONDATE date comment '?S????m?F???t'
1142
  , CONFIRMATIONENDFLG decimal(1,0) comment '?m?F?????t???O'
1143
  , NOTE varchar(120) comment '???l'
1144
  , ENTRYDATE datetime comment '?o?^???t'
1145
  , UPDATEDATE datetime comment '?X?V???t'
1146 184 bit
  , constraint depositdatadetail_PKC primary key (ORDERERSDIVISION,ORDERERSCODE,TARGETDATE,REQUESTNO)
1147 271 h-you
) comment '????????f?[?^' ;
1148 106 bit

1149 271 h-you
-- ???}?X?^
1150 325 h-you
drop table if exists divisionmaster cascade;
1151 198 h-you

1152
create table divisionmaster (
1153 271 h-you
  DivisionCode decimal(5,0) unsigned not null comment '???R?[?h'
1154
  , NameCode decimal(5,0) unsigned not null comment '????R?[?h'
1155
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
1156
  , NameString varchar(100) not null comment '????'
1157
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1158
  , EntryDate datetime not null comment '?o?^???t'
1159
  , UpdateDate datetime not null comment '?X?V???t'
1160 198 h-you
  , constraint divisionmaster_PKC primary key (DivisionCode,NameCode)
1161 271 h-you
) comment '???}?X?^' ;
1162 198 h-you

1163 271 h-you
-- ??Z?\?Z???f?[?^
1164 325 h-you
drop table if exists estimatebudget cascade;
1165 198 h-you

1166
create table estimatebudget (
1167 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1168
  , ConstructionTime decimal(5,2) unsigned not null comment '?H??'
1169
  , IntegratedCode decimal(8,0) not null comment '??Z??'
1170
  , DataCreateDate datetime not null comment '?f?[?^??????'
1171
  , RetValue1 decimal(12,0) not null comment '?\???i'
1172
  , RetValue2 decimal(12,0) not null comment '????H????'
1173
  , RetValue3 decimal(12,0) not null comment '????????????'
1174
  , RetValue4 decimal(12,0) not null comment '????????????'
1175
  , RetPercent decimal(5,2) not null comment '???????'
1176
  , EntryDate datetime not null comment '?o?^???t'
1177
  , UpdateDate datetime not null comment '?X?V???t'
1178 198 h-you
  , constraint estimatebudget_PKC primary key (ConstructionCode)
1179 271 h-you
) comment '??Z?\?Z???f?[?^' ;
1180 198 h-you

1181 271 h-you
-- ??Z?\?Z????f?[?^????
1182 325 h-you
drop table if exists estimatebudgetdetail cascade;
1183 198 h-you

1184
create table estimatebudgetdetail (
1185 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1186
  , GroupCount decimal(2,0) unsigned not null comment '?O???[?v???'
1187
  , LineCount decimal(3,0) unsigned not null comment '?s???'
1188
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
1189
  , ItemCode decimal(5,0) unsigned comment '?H??L?['
1190
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
1191
  , FirstString varchar(120) comment '???????'
1192
  , SecondString varchar(120) comment '?H????E???????'
1193
  , Content varchar(120) comment '???e'
1194
  , EstimatePrice decimal(12,0) not null comment '????????z'
1195
  , NegotiationPrice decimal(12,0) not null comment '????????z'
1196
  , Notes varchar(120) comment '???????'
1197
  , EntryDate datetime not null comment '?o?^???t'
1198
  , UpdateDate datetime not null comment '?X?V???t'
1199 198 h-you
  , constraint estimatebudgetdetail_PKC primary key (ConstructionCode,GroupCount,LineCount)
1200 271 h-you
) comment '??Z?\?Z????f?[?^????' ;
1201 198 h-you

1202 271 h-you
-- ??Z????f?[?^
1203 325 h-you
drop table if exists estimatedata cascade;
1204 198 h-you

1205
create table estimatedata (
1206 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1207
  , LineCount decimal(3,0) unsigned not null comment '?s???'
1208
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
1209
  , FixedItemCode varchar(1) comment '?????L?['
1210
  , ItemName varchar(120) comment '??????'
1211
  , SpecName varchar(120) comment '???^?i???E?`??E???@'
1212
  , PriceValue decimal(14,0) not null comment '???z'
1213
  , note varchar(60) comment '???l'
1214
  , MyExpensesFlg decimal(1,0) not null comment '????o??t???O'
1215
  , InputFlg decimal(1,0) not null comment '????t???O'
1216
  , EntryDate datetime not null comment '?o?^???t'
1217
  , UpdateDate datetime not null comment '?X?V???t'
1218 198 h-you
  , constraint estimatedata_PKC primary key (ConstructionCode,LineCount)
1219 271 h-you
) comment '??Z????f?[?^' ;
1220 198 h-you

1221
create index EstimateData_Index1
1222
  on estimatedata(ConstructionCode,FixedItemCode);
1223

1224 271 h-you
-- ??Z????y?[?W?f?[?^
1225 325 h-you
drop table if exists estimatedatabody cascade;
1226 198 h-you

1227
create table estimatedatabody (
1228 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1229
  , PageCount decimal(4,0) unsigned not null comment '?y?[?W???'
1230
  , Category decimal(1,0) not null comment '?y?[?W??'
1231
  , UnionComponentCode decimal(5,0) unsigned not null comment '?????\???L?['
1232
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
1233
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
1234
  , SelectComponent decimal(5,0) unsigned not null comment '?I???\???L?['
1235
  , PageTitle varchar(120) not null comment '?y?[?W?\????'
1236
  , DetailLineCount decimal(3,0) unsigned not null comment '????s???'
1237
  , EntryDate datetime not null comment '?o?^???t'
1238
  , UpdateDate datetime not null comment '?X?V???t'
1239 198 h-you
  , constraint estimatedatabody_PKC primary key (ConstructionCode,PageCount)
1240 271 h-you
) comment '??Z????y?[?W?f?[?^' ;
1241 198 h-you

1242
create index EstimateDataBody_Index1
1243
  on estimatedatabody(ConstructionCode,ComponentCode,ItemCode);
1244

1245 271 h-you
-- ??Z????f?[?^????
1246 325 h-you
drop table if exists estimatedatadetail cascade;
1247 198 h-you

1248
create table estimatedatadetail (
1249 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1250
  , PageCount decimal(4,0) unsigned not null comment '?y?[?W???'
1251
  , LineCount decimal(3,0) unsigned not null comment '?s???'
1252
  , DataType decimal(1,0) not null comment '?f?[?^???'
1253
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
1254
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
1255
  , SpecCode decimal(5,0) unsigned not null comment '???L?['
1256
  , ItemName varchar(120) comment '??????'
1257
  , SpecName varchar(120) comment '???^?i???E?`??E???@'
1258
  , Unitcount decimal(8,2) not null comment '????'
1259
  , UnitName varchar(30) comment '?P?????'
1260
  , UnitPrice decimal(9,2) not null comment '?P??'
1261
  , LineTotal decimal(12,0) not null comment '???z'
1262
  , note varchar(60) comment '???l'
1263
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
1264
  , MyExpensesFlg decimal(1,0) not null comment '????o??t???O'
1265
  , InputFlg decimal(1,0) comment '????t???O'
1266
  , EntryDate datetime not null comment '?o?^???t'
1267
  , UpdateDate datetime not null comment '?X?V???t'
1268 198 h-you
  , constraint estimatedatadetail_PKC primary key (ConstructionCode,PageCount,LineCount)
1269 271 h-you
) comment '??Z????f?[?^????' ;
1270 198 h-you

1271
create index EstimateDataDetail_Index1
1272
  on estimatedatadetail(ConstructionCode,PageCount);
1273

1274 271 h-you
-- ?o???}?X?^
1275 325 h-you
drop table if exists expensesmaster cascade;
1276 198 h-you

1277
create table expensesmaster (
1278 271 h-you
  DivisionCode smallint(6) not null comment '?H?????R?[?h'
1279
  , NameCode smallint(6) not null comment '?o????R?[?h'
1280
  , DisplayOrder smallint(6) not null comment '?\????'
1281
  , ExpensesRatio decimal(4,2) not null comment '?o??'
1282
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1283
  , EntryDate datetime not null comment '?o?^???t'
1284
  , UpdateDate datetime not null comment '?X?V???t'
1285 198 h-you
  , constraint expensesmaster_PKC primary key (DivisionCode,NameCode)
1286 271 h-you
) comment '?o???}?X?^' ;
1287 198 h-you

1288 271 h-you
-- ???x???}?X?^
1289 325 h-you
drop table if exists holidaycalendermaster cascade;
1290 198 h-you

1291
create table holidaycalendermaster (
1292 271 h-you
  Holiday date not null comment '?x??'
1293
  , BusinessYear smallint(5) unsigned not null comment '?c??N?x'
1294
  , TargetMonth tinyint(3) unsigned not null comment '?Y????'
1295
  , TargetDay tinyint(3) unsigned not null comment '?Y????'
1296 198 h-you
  , constraint holidaycalendermaster_PKC primary key (Holiday)
1297 271 h-you
) comment '???x???}?X?^' ;
1298 198 h-you

1299
create index HolidayCalender_Index1
1300
  on holidaycalendermaster(BusinessYear);
1301

1302
create index HolidayCalenderMaster_Index2
1303
  on holidaycalendermaster(TargetMonth);
1304

1305
create index HolidayCalenderMaster_Index3
1306
  on holidaycalendermaster(TargetDay);
1307

1308 271 h-you
-- ?????????????
1309 325 h-you
drop table if exists inputsearchlogdata cascade;
1310 198 h-you

1311
create table inputsearchlogdata (
1312 271 h-you
  ConstructionCode decimal(10,0) not null comment '?H???R?[?h'
1313
  , UsedProcessNo decimal(4,0) not null comment '?g?p?@?\???'
1314
  , DisplayOrder decimal(4,0) unsigned not null comment '?\????'
1315
  , DataType decimal(1,0) not null comment '?f?[?^???'
1316
  , InputCode decimal(10,0) comment '????R?[?h'
1317 198 h-you
  , constraint inputsearchlogdata_PKC primary key (ConstructionCode,UsedProcessNo,DisplayOrder)
1318 271 h-you
) comment '?????????????' ;
1319 198 h-you

1320
create index InputSearchLogData_Index1
1321
  on inputsearchlogdata(ConstructionCode,UsedProcessNo,InputCode);
1322

1323 271 h-you
-- ???????f?[?^
1324 325 h-you
drop table if exists invoicedata cascade;
1325 106 bit

1326
create table invoicedata (
1327 271 h-you
  INVOICENO decimal(9,0) not null comment '??????No'
1328
  , ORDERERSDIVISION decimal(5,0) not null comment '???????'
1329
  , ORDERERSCODE decimal(5,0) not null comment '??????R?[?h'
1330
  , REQUESTMONTH decimal(6,0) not null comment '??????'
1331
  , SEQNO decimal(2,0) not null comment '?A??'
1332
  , CRETATEDATE date not null comment '????'
1333
  , REQUESTDATE date not null comment '??????'
1334
  , REQUESTNAME varchar(120) comment '??????'
1335
  , TOTALAMOUNT decimal(10,0) comment '???????v???z'
1336
  , TAXAMOUNT decimal(10,0) comment '???????z'
1337
  , COMMENT1 varchar(60) comment '?R?????g1'
1338
  , COMMENT2 varchar(60) comment '?R?????g2'
1339
  , COMMENT3 varchar(60) not null comment '?R?????g3'
1340
  , COMMENT4 varchar(60) not null comment '?R?????g4'
1341
  , COMMENT5 varchar(60) not null comment '?R?????g5'
1342
  , COMPLETEFLG decimal(1,0) default '0' not null comment '?????t???O'
1343
  , ENTRYDATE datetime not null comment '?o?^?N????'
1344
  , UPDATEDATE datetime not null comment '?X?V?N????'
1345 106 bit
  , constraint invoicedata_PKC primary key (INVOICENO)
1346 271 h-you
) comment '???????f?[?^' ;
1347 106 bit

1348
alter table invoicedata add unique ORDERERSDIVISION (ORDERERSDIVISION,ORDERERSCODE,REQUESTMONTH,SEQNO) ;
1349

1350 271 h-you
-- ??????
1351 325 h-you
drop table if exists materialinfo cascade;
1352 106 bit

1353
create table materialinfo (
1354 271 h-you
  MATERIALITEMCODE smallint(5) unsigned default 0 not null comment '????i??R?[?h'
1355
  , MATERIALCOUNT smallint(5) unsigned comment '?????'
1356
  , RENTCOUNT smallint(5) unsigned comment '??o??\??'
1357
  , DELETEFLG smallint(5) unsigned comment '???t???O'
1358
  , ENTRYDATE datetime comment '?o?^???t'
1359
  , UPDATEDATE datetime comment '?X?V???t'
1360 106 bit
  , constraint materialinfo_PKC primary key (MATERIALITEMCODE)
1361 271 h-you
) comment '??????' ;
1362 106 bit

1363 271 h-you
-- ????i??}?X?^
1364 325 h-you
drop table if exists materialitemmaster cascade;
1365 106 bit

1366
create table materialitemmaster (
1367 271 h-you
  MATERIALITEMCODE smallint(5) unsigned default 0 not null comment '????i??R?[?h'
1368
  , MATERIALKINDCODE smallint(5) unsigned comment '??????R?[?h'
1369
  , MATERIALITEMNAME varchar(40) comment '????i?????'
1370
  , DISPLAYORDER smallint(5) unsigned comment '?\????'
1371
  , DELETEFLG tinyint(3) unsigned comment '???t???O'
1372
  , ENTRYDATE datetime comment '?o?^???t'
1373
  , UPDATEDATE datetime comment '?X?V???t'
1374
  , VERSIONNO decimal(8,0) default '0' not null comment '?o?[?W???????'
1375 106 bit
  , constraint materialitemmaster_PKC primary key (MATERIALITEMCODE)
1376 271 h-you
) comment '????i??}?X?^' ;
1377 106 bit

1378 271 h-you
-- ??????}?X?^
1379 325 h-you
drop table if exists materialkindmaster cascade;
1380 106 bit

1381
create table materialkindmaster (
1382 271 h-you
  MATERIALKINDCODE smallint(5) unsigned default 0 not null comment '??????R?[?h'
1383
  , MATERIALKINDNAME varchar(40) comment '?????????'
1384
  , DISPLAYORDER smallint(5) unsigned comment '?\????'
1385
  , DELETEFLG tinyint(3) unsigned comment '???t???O'
1386
  , ENTRYDATE datetime comment '?o?^???t'
1387
  , UPDATEDATE datetime comment '?X?V???t'
1388 106 bit
  , constraint materialkindmaster_PKC primary key (MATERIALKINDCODE)
1389 271 h-you
) comment '??????}?X?^' ;
1390 106 bit

1391 271 h-you
-- ??????????
1392 325 h-you
drop table if exists materialrecordinfo cascade;
1393 106 bit

1394
create table materialrecordinfo (
1395 271 h-you
  MATERIALITEMCODE smallint(5) unsigned default 0 not null comment '????i??R?[?h'
1396
  , PROCESSDATE date default '0000-00-00' not null comment '?????N????'
1397
  , SEQNO smallint(5) unsigned default 0 not null comment '?A??'
1398
  , RECKIND tinyint(3) unsigned comment '???R?[?h??'
1399
  , CONSTRUCTIONCODE int(10) unsigned comment '?H?????'
1400
  , PERSONCODE int(10) unsigned comment '?S????R?[?h'
1401
  , MATERIALCOUNT smallint(5) unsigned comment '?????'
1402
  , REPAYPLANDATE date comment '??p?\??N????'
1403
  , COMMENTTEXT varchar(80) comment '?R?????g'
1404
  , ENTRYDATE datetime comment '?o?^???t'
1405
  , UPDATEDATE datetime comment '?X?V???t'
1406 106 bit
  , constraint materialrecordinfo_PKC primary key (MATERIALITEMCODE,PROCESSDATE,SEQNO)
1407 271 h-you
) comment '??????????' ;
1408 106 bit

1409 271 h-you
-- ?f??????b?Z?[?W
1410 325 h-you
drop table if exists messageboarddata cascade;
1411 198 h-you

1412
create table messageboarddata (
1413 271 h-you
  RecordNumber decimal(6,0) unsigned not null comment '???R?[?h???'
1414
  , BranchNumber decimal(3,0) unsigned not null comment '???R?[?h?}??'
1415
  , FromCode decimal(8,0) unsigned not null comment '???????R?[?h'
1416
  , FromName varchar(60) not null comment '???????'
1417
  , MessageTitile varchar(100) comment '?`???^?C?g??'
1418
  , MessageContent varchar(1333) not null comment '?`?????e'
1419
  , LinkType decimal(2,0) not null comment '?????N????^?C?v'
1420
  , LinkMessage varchar(200) comment '?????N??????'
1421
  , LinkCode varchar(30) comment '?????N?L?['
1422
  , WritingDate datetime not null comment '?????????'
1423
  , PersonCode decimal(8,0) not null comment '??????S????R?[?h'
1424
  , ShareFlag decimal(2,0) not null comment '???????t???O'
1425
  , MessageColor varchar(8) comment '?????F'
1426
  , BackColor varchar(8) comment '?o?b?N?J???['
1427
  , MessageFlag decimal(1,0) not null comment '???b?Z?[?W?t???O'
1428
  , EntryDate datetime not null comment '?o?^???t'
1429
  , UpdateDate datetime not null comment '?X?V???t'
1430 198 h-you
  , constraint messageboarddata_PKC primary key (RecordNumber,BranchNumber)
1431 271 h-you
) comment '?f??????b?Z?[?W' ;
1432 198 h-you

1433
create index MessageBoardData_Index1
1434
  on messageboarddata(WritingDate);
1435

1436
create index MessageBoardData_Index2
1437
  on messageboarddata(MessageFlag);
1438

1439 271 h-you
-- ?f???????e?[?u??
1440 325 h-you
drop table if exists messageboardterget cascade;
1441 198 h-you

1442
create table messageboardterget (
1443 271 h-you
  RecordNumber decimal(6,0) unsigned not null comment '???R?[?h???'
1444
  , BranchNumber decimal(3,0) unsigned not null comment '???R?[?h?}??'
1445
  , SeqNum decimal(3,0) unsigned not null comment '????'
1446
  , ToCode decimal(8,0) not null comment '????R?[?h'
1447
  , ToName varchar(60) not null comment '????'
1448
  , EntryDate datetime not null comment '?o?^???t'
1449
  , UpdateDate datetime not null comment '?X?V???t'
1450 198 h-you
  , constraint messageboardterget_PKC primary key (RecordNumber,BranchNumber,SeqNum)
1451 271 h-you
) comment '?f???????e?[?u??' ;
1452 198 h-you

1453
create index MessageBoardTerget_Index1
1454
  on messageboardterget(RecordNumber,BranchNumber);
1455

1456 271 h-you
-- ?f??????b?Z?[?W?{??????
1457 325 h-you
drop table if exists messagebrowsinghistory cascade;
1458 198 h-you

1459
create table messagebrowsinghistory (
1460 271 h-you
  RecordNumber decimal(6,0) unsigned not null comment '???R?[?h???'
1461
  , BranchNumber decimal(3,0) unsigned not null comment '???R?[?h?}??'
1462
  , SeqNum decimal(3,0) unsigned not null comment '????'
1463
  , BrowsingCode decimal(8,0) not null comment '?{????R?[?h'
1464
  , BrowsingDate datetime not null comment '?{?????t'
1465
  , EntryDate datetime not null comment '?o?^???t'
1466
  , UpdateDate datetime not null comment '?X?V???t'
1467 198 h-you
  , constraint messagebrowsinghistory_PKC primary key (RecordNumber,BranchNumber,SeqNum)
1468 271 h-you
) comment '?f??????b?Z?[?W?{??????' ;
1469 198 h-you

1470 271 h-you
-- ???}?X?^
1471 325 h-you
drop table if exists monthmaster cascade;
1472 198 h-you

1473
create table monthmaster (
1474 271 h-you
  month smallint(6) not null comment '??'
1475
) comment '???}?X?^' ;
1476 198 h-you

1477
create index month_Index1
1478
  on monthmaster(month);
1479

1480 271 h-you
-- ??????}?X?^
1481 325 h-you
drop table if exists orderersmaster cascade;
1482 198 h-you

1483
create table orderersmaster (
1484 271 h-you
  OrderCotegory decimal(5,0) unsigned not null comment '???????'
1485
  , OrderersCode decimal(5,0) unsigned not null comment '??????R?[?h'
1486
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
1487
  , OrderFlg decimal(1,0) not null comment '?@?l?c??E??l?t???O'
1488
  , CorporateStatusName varchar(100) comment '?@?l?i????'
1489
  , CorporateStatusPoint decimal(1,0) comment '?@?l?i?????u'
1490
  , OrderersName1 varchar(60) not null comment '???????1'
1491
  , OrderersName2 varchar(60) comment '????????Q'
1492
  , DepartmentName varchar(60) comment '??????'
1493
  , ChargePersonName varchar(60) comment '?S?????'
1494
  , ZipCode varchar(8) comment '?X????'
1495
  , Address1 varchar(60) comment '?Z???P'
1496
  , Address2 varchar(60) comment '?Z??2'
1497
  , Address3 varchar(60) comment '?Z??3'
1498
  , PhoneNumber varchar(13) comment '?d?b???'
1499
  , FaxNumber varchar(13) comment 'FAX???'
1500
  , MailAddress varchar(257) comment '???[???A?h???X'
1501
  , Note varchar(300) comment '???l'
1502
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1503
  , EntryDate datetime not null comment '?o?^???t'
1504
  , UpdateDate datetime not null comment '?X?V???t'
1505 198 h-you
  , constraint orderersmaster_PKC primary key (OrderCotegory,OrderersCode)
1506 271 h-you
) comment '??????}?X?^' ;
1507 198 h-you

1508 271 h-you
-- ????z?f?[?^
1509 325 h-you
drop table if exists orderspricedata cascade;
1510 198 h-you

1511
create table orderspricedata (
1512 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1513
  , ChangeNo decimal(3,0) unsigned not null comment '??X???'
1514
  , ChangeDate date not null comment '??X??'
1515
  , ChangePersonCode decimal(8,0) unsigned not null comment '??X??R?[?h'
1516
  , ChangePersonName varchar(60) comment '??X???'
1517
  , BeforeValue decimal(14,0) not null comment '??X?O???????z'
1518
  , BeforeValueInTax decimal(14,0) not null comment '??X?O???????z'
1519
  , AfterValue decimal(14,0) not null comment '??X????????z'
1520
  , AfterValueInTax decimal(14,0) not null comment '??X????????z'
1521
  , ChangeComment varchar(200) comment '??X???R'
1522
  , EntryDate datetime not null comment '?o?^???t'
1523
  , UpdateDate datetime not null comment '?X?V???t'
1524 198 h-you
  , constraint orderspricedata_PKC primary key (ConstructionCode,ChangeNo)
1525 271 h-you
) comment '????z?f?[?^' ;
1526 198 h-you

1527 271 h-you
-- ?x?????F???f?[?^
1528 325 h-you
drop table if exists paymentapprovalinfo cascade;
1529 106 bit

1530
create table paymentapprovalinfo (
1531 271 h-you
  COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h'
1532
  , TARGETDATE decimal(6,0) default '0' not null comment '???N??'
1533
  , SEQNO decimal(3,0) default '0' not null comment '?A??'
1534
  , LINECOUNT decimal(3,0) default '0' not null comment '?s???'
1535
  , APPROVALNO decimal(3,0) default '0' not null comment '???F????'
1536
  , APPROVALPERSON decimal(8,0) comment '???F??R?[?h'
1537
  , APPROVALPERSONNAME varchar(20) comment '???F???'
1538
  , APPROVALAUTHORITY decimal(1,0) comment '???F??????'
1539
  , APPROVALDATE date comment '???F???t'
1540
  , ENTRYDATE datetime comment '?o?^???t'
1541
  , UPDATEDATE datetime comment '?X?V???t'
1542 106 bit
  , constraint paymentapprovalinfo_PKC primary key (COMPANYCODE,TARGETDATE,SEQNO,LINECOUNT,APPROVALNO)
1543 271 h-you
) comment '?x?????F???f?[?^' ;
1544 106 bit

1545 271 h-you
-- ?x??????f?[?^
1546 325 h-you
drop table if exists paymentdatadetail cascade;
1547 106 bit

1548
create table paymentdatadetail (
1549 271 h-you
  COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h'
1550
  , TARGETDATE decimal(6,0) default '0' not null comment '???N??'
1551
  , SEQNO decimal(3,0) default '0' not null comment '?A??'
1552
  , LINECOUNT decimal(3,0) default '0' not null comment '?s???'
1553
  , BILLPRICE decimal(10,0) comment '???????z'
1554
  , DISCOUNTPRICE decimal(10,0) comment '?l???????z'
1555
  , OFFSETPRICE decimal(10,0) comment '???E???z'
1556
  , NEXTCOPRICE decimal(10,0) comment '????J?z'
1557
  , HIGHWPRICE decimal(10,0) comment '??????'
1558
  , HARDWPRICE decimal(10,0) comment '??????'
1559
  , INDSWASTETAX decimal(10,0) comment '?Y?p??'
1560
  , CNSTRPRICE decimal(10,0) comment '?????'
1561
  , CNSTRPRICEEXIST decimal(1,0) comment '??????L??'
1562
  , APPROVALPERSONCODE decimal(8,0) comment '???F?S????R?[?h'
1563
  , APPROVALDATE date comment '?S??????F???t'
1564
  , APPROVALENDFLG decimal(1,0) comment '???F?????t???O'
1565
  , ENTRYDATE datetime comment '?o?^???t'
1566
  , UPDATEDATE datetime comment '?X?V???t'
1567 106 bit
  , constraint paymentdatadetail_PKC primary key (COMPANYCODE,TARGETDATE,SEQNO,LINECOUNT)
1568 271 h-you
) comment '?x??????f?[?^' ;
1569 106 bit

1570 322 h-you
create index PayDataDetail_Index1
1571
  on paymentdatadetail(TARGETDATE);
1572

1573
create index PayDataDetail_Index2
1574
  on paymentdatadetail(APPROVALPERSONCODE);
1575

1576 302 h-you
-- ?H??????????f?[?^
1577 325 h-you
drop table if exists periodavoidance cascade;
1578 302 h-you

1579
create table periodavoidance (
1580
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1581
  , ConstructionStatusFlg decimal(2,0) not null comment '?H?????t???O'
1582
  , FieldNo decimal(2,0) not null comment '?`?F?b?N???t?B?[???h???'
1583
  , EntryDate datetime not null comment '?o?^???t'
1584
  , UpdateDate datetime not null comment '?X?V???t'
1585
  , constraint periodavoidance_PKC primary key (ConstructionCode,ConstructionStatusFlg,FieldNo)
1586
) comment '?H??????????f?[?^' ;
1587

1588
create index PeriodAvoidance_Index1
1589
  on periodavoidance(ConstructionCode);
1590

1591
create index PeriodAvoidance_Index2
1592
  on periodavoidance(ConstructionStatusFlg);
1593

1594
create index PeriodAvoidance_Index3
1595
  on periodavoidance(FieldNo);
1596

1597 271 h-you
-- ?S??????F?f?[?^
1598 325 h-you
drop table if exists personapproval cascade;
1599 198 h-you

1600
create table personapproval (
1601 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
1602
  , ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???'
1603
  , OrderDate date not null comment '??t??'
1604
  , OrderNo decimal(2,0) unsigned not null comment '??t???'
1605
  , SeqNo decimal(2,0) not null comment '?}??'
1606
  , PersonCodeApproval decimal(8,0) unsigned not null comment '?\???E???F??R?[?h'
1607
  , PetitionApprovalDate datetime not null comment '?\???E???F???t'
1608
  , ApprovalLimitDates datetime not null comment '???F??]??'
1609
  , ApprovalStatus decimal(1,0) not null comment '???F???'
1610
  , InputComment varchar(300) comment '?R?????g'
1611
  , EntryDate datetime not null comment '?o?^???t'
1612
  , UpdateDate datetime not null comment '?X?V???t'
1613 198 h-you
  , constraint personapproval_PKC primary key (PersonCode,ApprovalCode,OrderDate,OrderNo,SeqNo)
1614 271 h-you
) comment '?S??????F?f?[?^' ;
1615 198 h-you

1616 271 h-you
-- ?S??????F?R?????g?f?[?^
1617 325 h-you
drop table if exists personapprovalcomment cascade;
1618 198 h-you

1619
create table personapprovalcomment (
1620 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
1621
  , ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???'
1622
  , OrderDate date not null comment '??t??'
1623
  , OrderNo decimal(2,0) unsigned not null comment '??t???'
1624
  , CommentNo decimal(2,0) not null comment '?R?????g???'
1625
  , ParentNo decimal(2,0) not null comment '?e?R?????g???'
1626
  , ApproValComment varchar(300) comment '?w???E?A???R?????g'
1627
  , EntryDate datetime not null comment '?o?^???t'
1628
  , UpdateDate datetime not null comment '?X?V???t'
1629 198 h-you
  , constraint personapprovalcomment_PKC primary key (PersonCode,ApprovalCode,OrderDate,OrderNo,CommentNo)
1630 271 h-you
) comment '?S??????F?R?????g?f?[?^' ;
1631 198 h-you

1632 271 h-you
-- ?S??????????}?X?^
1633 325 h-you
drop table if exists persondepartmentmaster cascade;
1634 198 h-you

1635
create table persondepartmentmaster (
1636 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
1637
  , DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
1638
  , AffiliationFlg decimal(1,0) not null comment '?????t???O'
1639
  , EntryDate datetime not null comment '?o?^???t'
1640
  , UpdateDate datetime not null comment '?X?V???t'
1641 198 h-you
  , constraint persondepartmentmaster_PKC primary key (PersonCode,DepartmentCode)
1642 271 h-you
) comment '?S??????????}?X?^' ;
1643 198 h-you

1644
create index PersonDepartmentMaster_Index1
1645
  on persondepartmentmaster(PersonCode);
1646

1647
create index PersonDepartmentMaster_Index2
1648
  on persondepartmentmaster(DepartmentCode);
1649

1650 271 h-you
-- ?S????}?X?^
1651 325 h-you
drop table if exists personinchargemaster cascade;
1652 198 h-you

1653
create table personinchargemaster (
1654 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
1655
  , DisplayOrder decimal(8,0) unsigned not null comment '?\????'
1656
  , PersonName varchar(60) not null comment '?S?????'
1657
  , StartDate date not null comment '?g?p?J?n?N????'
1658
  , EndDate date comment '?g?p?I???N????'
1659
  , PassWord varchar(16) comment '?p?X???[?h'
1660
  , SecurityManagement decimal(1,0) not null comment '?@????'
1661
  , SecCode decimal(2,0) unsigned not null comment '???????'
1662
  , MsgBackColor varchar(8) comment '???b?Z?[?W?w?i?F'
1663
  , DisplayString varchar(20) comment '?\???E???????'
1664
  , DepartmentCode decimal(5,0) unsigned comment '?????R?[?h'
1665
  , MonthlySalary decimal(11,0) not null comment '???????z'
1666
  , YearSalary decimal(12,0) not null comment '?N????z'
1667
  , Qualification varchar(120) comment '???i?????'
1668
  , SealPrintName varchar(5) comment '???\????'
1669
  , EmployeeClassFlg decimal(1,0) not null comment '?????'
1670
  , LedgerFlg decimal(1,0) not null comment '???v?Z???t???O'
1671
  , CommutingDistance decimal(5,2) not null comment '??????'
1672
  , CommuteCosts decimal(5,0) not null comment '??????'
1673
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1674
  , EntryDate datetime not null comment '?o?^???t'
1675
  , UpdateDate datetime not null comment '?X?V???t'
1676 198 h-you
  , constraint personinchargemaster_PKC primary key (PersonCode)
1677 271 h-you
) comment '?S????}?X?^' ;
1678 198 h-you

1679
create index PersonInChargeMaster_Index1
1680
  on personinchargemaster(StartDate);
1681

1682
create index PersonInChargeMaster_Index2
1683
  on personinchargemaster(DepartmentCode);
1684

1685 271 h-you
-- ?S??????^?}?X?^
1686 325 h-you
drop table if exists personsalarymaster cascade;
1687 198 h-you

1688
create table personsalarymaster (
1689 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
1690
  , StartDate date not null comment '?g?p?J?n?N????'
1691
  , MonthlySalary decimal(11,0) not null comment '???????z'
1692
  , YearSalary decimal(12,0) not null comment '?N????z'
1693
  , EntryDate datetime not null comment '?o?^???t'
1694
  , UpdateDate datetime not null comment '?X?V???t'
1695 198 h-you
  , constraint personsalarymaster_PKC primary key (PersonCode,StartDate)
1696 271 h-you
) comment '?S??????^?}?X?^' ;
1697 198 h-you

1698
create index PersonSalaryMaster_Index1
1699
  on personsalarymaster(PersonCode);
1700

1701
create index PersonSalaryMaster_Index2
1702
  on personsalarymaster(StartDate);
1703

1704 271 h-you
-- ?w???????f?[?^
1705 325 h-you
drop table if exists pointingoutcomment cascade;
1706 198 h-you

1707
create table pointingoutcomment (
1708 271 h-you
  ConstructionCode decimal(10,0) not null comment '?H???R?[?h'
1709
  , ProcessNo smallint(6) not null comment '????????i??????j'
1710
  , SeqNo smallint(6) not null comment '????'
1711
  , PageCount smallint(6) not null comment '?y?[?W???'
1712
  , PersonCode decimal(8,0) not null comment '?L????R?[?h'
1713
  , DrowColor varchar(8) comment '?`??F'
1714
  , CommentMessage varchar(1000) comment '???b?Z?[?W'
1715
  , StartPointX smallint(6) not null comment '?w?E?????u?w'
1716
  , StartPointY smallint(6) not null comment '?w?E?????u?x'
1717
  , CurrentPointX smallint(6) not null comment '??????u?w'
1718
  , CurrentPointY smallint(6) not null comment '??????u?x'
1719
  , CurrentWidth smallint(6) not null comment '?\???T?C?YWidth'
1720
  , CurrentHeight smallint(6) not null comment '?\???T?C?YHeigth'
1721
  , EntryDate datetime not null comment '?o?^???t'
1722
  , UpdateDate datetime not null comment '?X?V???t'
1723 198 h-you
  , constraint pointingoutcomment_PKC primary key (ConstructionCode,ProcessNo,SeqNo)
1724 271 h-you
) comment '?w???????f?[?^' ;
1725 198 h-you

1726 271 h-you
-- ?????????????c???^?f?[?^
1727 325 h-you
drop table if exists proceedingsdata cascade;
1728 198 h-you

1729
create table proceedingsdata (
1730 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1731
  , ProceedingsDataDate date not null comment '?c???^????'
1732
  , StartMeetingTime decimal(4,0) unsigned not null comment '??c????J?n'
1733
  , EndMeetingTime decimal(4,0) unsigned not null comment '??c????I??'
1734
  , CreatorCode decimal(8,0) not null comment '????R?[?h'
1735
  , PalceFlag decimal(1,0) not null comment '???n?t???O'
1736
  , MeetingPalce varchar(120) comment '???????'
1737
  , EntryDate datetime not null comment '?o?^???t'
1738
  , UpdateDate datetime not null comment '?X?V???t'
1739 198 h-you
  , constraint proceedingsdata_PKC primary key (ConstructionCode,ProceedingsDataDate,StartMeetingTime)
1740 271 h-you
) comment '?????????????c???^?f?[?^' ;
1741 198 h-you

1742 271 h-you
-- ?????????????c???^?f?[?^?i?o???j
1743 325 h-you
drop table if exists proceedingsdataattend cascade;
1744 198 h-you

1745
create table proceedingsdataattend (
1746 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1747
  , ProceedingsDataDate date not null comment '?c???^????'
1748
  , StartMeetingTime decimal(4,0) unsigned not null comment '??c????J?n'
1749
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
1750
  , Department varchar(20) comment '?o??????'
1751
  , AttendName varchar(10) comment '?o??????'
1752
  , EntryDate datetime not null comment '?o?^???t'
1753
  , UpdateDate datetime not null comment '?X?V???t'
1754 198 h-you
  , constraint proceedingsdataattend_PKC primary key (ConstructionCode,ProceedingsDataDate,StartMeetingTime,SeqNo)
1755 271 h-you
) comment '?????????????c???^?f?[?^?i?o???j' ;
1756 198 h-you

1757 271 h-you
-- ?????????????c???^?f?[?^?i????j
1758 325 h-you
drop table if exists proceedingsdatadetail cascade;
1759 198 h-you

1760
create table proceedingsdatadetail (
1761 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1762
  , ProceedingsDataDate date not null comment '?c???^????'
1763
  , StartMeetingTime decimal(4,0) unsigned not null comment '??c????J?n'
1764
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
1765
  , TitleNo varchar(5) comment '?c????'
1766
  , Title varchar(20) comment '?c??'
1767
  , ContentsText varchar(50) comment '???e'
1768
  , EntryDate datetime not null comment '?o?^???t'
1769
  , UpdateDate datetime not null comment '?X?V???t'
1770 198 h-you
  , constraint proceedingsdatadetail_PKC primary key (ConstructionCode,ProceedingsDataDate,StartMeetingTime,SeqNo)
1771 271 h-you
) comment '?????????????c???^?f?[?^?i????j' ;
1772 198 h-you

1773 271 h-you
-- ???F?f?[?^
1774 325 h-you
drop table if exists processapproval cascade;
1775 198 h-you

1776
create table processapproval (
1777 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1778
  , ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???'
1779
  , OrderNo decimal(2,0) unsigned not null comment '??t???'
1780
  , SeqNo decimal(2,0) not null comment '?}??'
1781
  , PersonCode decimal(8,0) unsigned not null comment '?\???E???F??R?[?h'
1782
  , PetitionApprovalDate datetime not null comment '?\???E???F???t'
1783
  , ApprovalLimitDates datetime not null comment '???F??]??'
1784
  , ApprovalStatus decimal(1,0) not null comment '???F???'
1785
  , InputComment varchar(300) comment '?R?????g'
1786
  , EntryDate datetime not null comment '?o?^???t'
1787
  , UpdateDate datetime not null comment '?X?V???t'
1788 198 h-you
  , constraint processapproval_PKC primary key (ConstructionCode,ApprovalCode,OrderNo,SeqNo)
1789 271 h-you
) comment '???F?f?[?^' ;
1790 198 h-you

1791 271 h-you
-- ???F?R?????g?f?[?^
1792 325 h-you
drop table if exists processapprovalcomment cascade;
1793 198 h-you

1794
create table processapprovalcomment (
1795 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1796
  , ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???'
1797
  , OrderNo decimal(2,0) unsigned not null comment '??t???'
1798
  , CommentNo decimal(2,0) not null comment '?R?????g???'
1799
  , ParentNo decimal(2,0) not null comment '?e?R?????g???'
1800
  , ApproValComment varchar(300) comment '?w???E?A???R?????g'
1801
  , EntryDate datetime not null comment '?o?^???t'
1802
  , UpdateDate datetime not null comment '?X?V???t'
1803 198 h-you
  , constraint processapprovalcomment_PKC primary key (ConstructionCode,ApprovalCode,OrderNo,CommentNo)
1804 271 h-you
) comment '???F?R?????g?f?[?^' ;
1805 198 h-you

1806 271 h-you
-- ???F????f?[?^
1807 325 h-you
drop table if exists processapprovaldetail cascade;
1808 198 h-you

1809
create table processapprovaldetail (
1810 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1811
  , ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???'
1812
  , OrderNo decimal(2,0) unsigned not null comment '??t???'
1813
  , SerialNo decimal(2,0) unsigned not null comment '?}??'
1814
  , LinkCode decimal(10,0) not null comment '?????N???'
1815
  , EntryDate datetime not null comment '?o?^???t'
1816
  , UpdateDate datetime not null comment '?X?V???t'
1817 198 h-you
  , constraint processapprovaldetail_PKC primary key (ConstructionCode,ApprovalCode,OrderNo,SerialNo)
1818 271 h-you
) comment '???F????f?[?^' ;
1819 198 h-you

1820 271 h-you
-- ?N?????}?X?^
1821 325 h-you
drop table if exists processexcutemaster cascade;
1822 198 h-you

1823
create table processexcutemaster (
1824 271 h-you
  SecCode decimal(2,0) unsigned not null comment '???????'
1825
  , ExecCode decimal(4,0) unsigned not null comment '?N?????????'
1826
  , EditFlg decimal(1,0) not null comment '??W?t???O'
1827
  , EntryDate datetime not null comment '?o?^???t'
1828
  , UpdateDate datetime not null comment '?X?V???t'
1829 198 h-you
  , constraint processexcutemaster_PKC primary key (SecCode,ExecCode)
1830 271 h-you
) comment '?N?????}?X?^' ;
1831 198 h-you

1832
create index ProcessExcuteMaster_Index1
1833
  on processexcutemaster(SecCode);
1834

1835
create index ProcessExcuteMaster_Index2
1836
  on processexcutemaster(ExecCode);
1837

1838 271 h-you
-- ???????f?[?^
1839 325 h-you
drop table if exists purchaseorder cascade;
1840 198 h-you

1841
create table purchaseorder (
1842 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1843
  , SeqNo decimal(3,0) unsigned not null comment '???????}??'
1844
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
1845
  , CreateDate date comment '?????t'
1846
  , OrderPrice decimal(12,0) not null comment '???????z'
1847
  , LastRowStringDate date not null comment '??I?s?\?????t'
1848
  , OrderSheetType decimal(1,0) not null comment '???E?{???t???O'
1849
  , PaymentTerms decimal(1,0) not null comment '?x????????'
1850
  , CashRatio decimal(4,1) not null comment '?????????i???j'
1851
  , BillPeriod decimal(4,0) not null comment '??`????'
1852
  , PrePayments decimal(1,0) not null comment '?O????'
1853
  , PrePaymentsDays decimal(3,0) not null comment '?O????????'
1854
  , PrePaymentsPrice decimal(12,0) not null comment '?O???????z'
1855
  , PartialPayment decimal(1,0) not null comment '??????'
1856
  , PartialPaymentMounth decimal(2,0) unsigned not null comment '???????????'
1857
  , PartialPaymentDay1 decimal(2,0) unsigned not null comment '???????????'
1858
  , PartialPaymentDay2 decimal(2,0) unsigned not null comment '???????x????'
1859
  , PartialPaymentPrice decimal(12,0) not null comment '?????????z'
1860
  , CompletionPayment decimal(1,0) not null comment '???n??????x??'
1861
  , CompletionPaymentDays decimal(3,0) unsigned not null comment '???n??????x??????'
1862
  , CompletionPaymentPrice decimal(12,0) not null comment '???n??????x?????z'
1863
  , LeadEngineerCode decimal(8,0) comment '??C?Z?p??R?[?h'
1864 277 h-you
  , LeadEngineerName varchar(60) comment '??C?Z?p???'
1865 271 h-you
  , SafetyOfficerCode decimal(8,0) comment '???S?????R?[?h'
1866
  , SafetyOfficerName varchar(60) comment '???S??????'
1867
  , WorkersCount decimal(3,0) unsigned comment '??????'
1868
  , PrintoutDate date not null comment '????N????'
1869
  , EntryDate datetime not null comment '?o?^???t'
1870
  , UpdateDate datetime not null comment '?X?V???t'
1871 198 h-you
  , constraint purchaseorder_PKC primary key (ConstructionCode,SeqNo)
1872 271 h-you
) comment '???????f?[?^' ;
1873 198 h-you

1874 271 h-you
-- ?????????t?f?[?^
1875 325 h-you
drop table if exists purchaseorderdate cascade;
1876 198 h-you

1877
create table purchaseorderdate (
1878 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1879
  , SeqNo decimal(3,0) unsigned not null comment '???????}??'
1880
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
1881
  , SendDate date not null comment '???????X????'
1882
  , ReturnDate date not null comment '???????????'
1883
  , ReturnCheckDate date not null comment '??????????m?F??'
1884
  , EntryDate datetime not null comment '?o?^???t'
1885
  , UpdateDate datetime not null comment '?X?V???t'
1886 198 h-you
  , constraint purchaseorderdate_PKC primary key (ConstructionCode,SeqNo)
1887 271 h-you
) comment '?????????t?f?[?^' ;
1888 198 h-you

1889 271 h-you
-- ??????????f?[?^
1890 325 h-you
drop table if exists purchaseorderdetail cascade;
1891 198 h-you

1892
create table purchaseorderdetail (
1893 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1894
  , SeqNo decimal(3,0) unsigned not null comment '???????}??'
1895
  , GroupCount decimal(1,0) not null comment '?O???[?v???'
1896
  , LineCount decimal(3,0) unsigned not null comment '?s???'
1897
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
1898
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
1899
  , FirstString varchar(120) comment '?H??E?i??'
1900
  , SecondString varchar(120) comment '???e????'
1901
  , UnitCount decimal(8,2) not null comment '????'
1902
  , UnitName varchar(30) comment '?P??'
1903
  , UnitPrice decimal(10,0) not null comment '?P??'
1904
  , OrdersLinePrice decimal(12,0) comment '???z'
1905 302 h-you
  , SourceCode decimal(10,0) unsigned not null comment '???H?????'
1906
  , SourceDetailCnt decimal(4,0) unsigned not null comment '????????'
1907
  , DataTypeFlag decimal(1,0) unsigned not null comment '?f?[?^?^?C?v?t???O'
1908 271 h-you
  , EntryDate datetime not null comment '?o?^???t'
1909
  , UpdateDate datetime not null comment '?X?V???t'
1910 198 h-you
  , constraint purchaseorderdetail_PKC primary key (ConstructionCode,SeqNo,GroupCount,LineCount)
1911 271 h-you
) comment '??????????f?[?^' ;
1912 198 h-you

1913
create index POrderDetail_Index1
1914
  on purchaseorderdetail(SourceCode);
1915

1916 271 h-you
-- ?????f?[?^
1917 325 h-you
drop table if exists requestdata cascade;
1918 106 bit

1919
create table requestdata (
1920 271 h-you
  REQUESTNO decimal(9,0) not null comment '????No'
1921
  , MAINCONSTRUCTIONCODE decimal(10,0) not null comment '?{?H?????'
1922
  , CONSTRUCTIONNAME varchar(120) not null comment '?H??????'
1923
  , CONTRACTAMOUNT decimal(10,0) not null comment '???????z'
1924
  , PAIDAMOUNT decimal(10,0) not null comment '????????z'
1925
  , REQUESTAMOUNT0 decimal(10,0) not null comment '???????z?O'
1926
  , REQUESTAMOUNT1 decimal(10,0) not null comment '???????z?P'
1927
  , REQUESTAMOUNT2 decimal(10,0) comment '???????z?Q'
1928
  , REQUESTAMOUNT3 decimal(10,0) comment '???????z?R'
1929
  , REQUESTAMOUNT4 decimal(10,0) comment '???????z?S'
1930
  , REQUESTAMOUNT5 decimal(10,0) comment '???????z?T'
1931
  , REQUESTAMOUNT6 decimal(10,0) comment '???????z?U'
1932
  , UNCLAIMEDAMOUNT decimal(10,0) not null comment '?????c???z'
1933
  , UNPAIDAMOUNT decimal(10,0) not null comment '?????????z'
1934
  , TAXAMOUNT decimal(10,0) not null comment '?????'
1935
  , NOTE varchar(120) not null comment '???l'
1936
  , ENTRYDATE datetime not null comment '?o?^?N????'
1937
  , UPDATEDATE datetime not null comment '?X?V?N????'
1938 106 bit
  , constraint requestdata_PKC primary key (REQUESTNO,MAINCONSTRUCTIONCODE)
1939 271 h-you
) comment '?????f?[?^' ;
1940 106 bit

1941 271 h-you
-- ?????f?[?^????
1942 325 h-you
drop table if exists requestdatadetail cascade;
1943 106 bit

1944
create table requestdatadetail (
1945 271 h-you
  REQUESTNO decimal(9,0) not null comment '????No'
1946
  , MAINCONSTRUCTIONCODE decimal(10,0) not null comment '?{?H?????'
1947
  , CONSTRUCTIONCODE decimal(10,0) not null comment '?H?????'
1948
  , CONSTRUCTIONKIND decimal(1,0) not null comment '?H????'
1949
  , REQUESTAMOUNT decimal(10,0) not null comment '???????z'
1950
  , TAXAMOUNT decimal(10,0) not null comment '?????'
1951
  , ENTRYDATE datetime not null comment '?o?^?N????'
1952
  , UPDATEDATE datetime not null comment '?X?V?N????'
1953 106 bit
  , constraint requestdatadetail_PKC primary key (REQUESTNO,MAINCONSTRUCTIONCODE,CONSTRUCTIONCODE,CONSTRUCTIONKIND)
1954 271 h-you
) comment '?????f?[?^????' ;
1955 106 bit

1956 271 h-you
-- ?????w?b?_
1957 325 h-you
drop table if exists requesthead cascade;
1958 106 bit

1959
create table requesthead (
1960 271 h-you
  REQUESTNO decimal(9,0) not null comment '????No'
1961
  , REQCONSTRUCTIONCODE decimal(10,0) not null comment '?????H?????'
1962
  , ORDERNO decimal(2,0) not null comment '??t???'
1963
  , REQUESTMONTH decimal(6,0) not null comment '??????'
1964
  , ORDERERSDIVISION decimal(5,0) not null comment '???????'
1965
  , ORDERERSCODE decimal(5,0) not null comment '??????R?[?h'
1966
  , ORDERERSNAME varchar(120) not null comment '???????'
1967
  , REQCONSTRUCTIONNAME varchar(120) not null comment '?????H??????'
1968
  , REQUESTTOTALAMOUNT decimal(10,0) not null comment '???????z???v'
1969
  , REQUESTAMOUNT decimal(10,0) not null comment '???????z'
1970
  , TAXAMOUNT decimal(10,0) not null comment '?????'
1971
  , UNPAIDAMOUNT decimal(10,0) comment '??????'
1972
  , NOTE varchar(120) comment '???l'
1973
  , ASSIGNEDFLG decimal(1,0) comment '??????t???O'
1974
  , INVOICENO decimal(9,0) not null comment '??????No'
1975
  , ENTRYDATE datetime not null comment '?o?^?N????'
1976
  , UPDATEDATE datetime not null comment '?X?V?N????'
1977 106 bit
  , constraint requesthead_PKC primary key (REQUESTNO)
1978 271 h-you
) comment '?????w?b?_' ;
1979 106 bit

1980
alter table requesthead add unique REQCONSTRUCTIONCODE (REQCONSTRUCTIONCODE,ORDERNO) ;
1981

1982 271 h-you
-- ?????????t?f?[?^
1983 325 h-you
drop table if exists requestorderdate cascade;
1984 106 bit

1985 198 h-you
create table requestorderdate (
1986 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1987
  , InvoiceNo decimal(9,0) not null comment '??????No'
1988
  , SendDate date not null comment '???????????X????'
1989
  , EntryDate datetime not null comment '?o?^???t'
1990
  , UpdateDate datetime not null comment '?X?V???t'
1991 239 h-you
  , constraint requestorderdate_PKC primary key (ConstructionCode,InvoiceNo)
1992 271 h-you
) comment '?????????t?f?[?^' ;
1993 109 bit

1994 271 h-you
-- ????O???t?f?[?^
1995 325 h-you
drop table if exists salesgraphdata cascade;
1996 198 h-you

1997
create table salesgraphdata (
1998 271 h-you
  GraphDataCode decimal(8,0) not null comment '?O???t?f?[?^?R?[?h'
1999
  , ConstructionPeriod decimal(4,0) unsigned not null comment '?????'
2000
  , SalesDataDays date not null comment '????N??'
2001
  , DisplayOrder decimal(8,0) unsigned not null comment '?\????'
2002
  , DataName varchar(100) not null comment '?f?[?^?\??????'
2003
  , SalesAmount decimal(10,0) not null comment '????f?[?^'
2004
  , AdministrativeExpense decimal(10,0) not null comment '???E?????o??'
2005
  , GrossProfit decimal(10,0) not null comment '?e???v'
2006
  , NetIncome decimal(10,0) not null comment '?????v(???v)'
2007
  , EntryDate datetime not null comment '?o?^???t'
2008
  , UpdateDate datetime not null comment '?X?V???t'
2009 198 h-you
  , constraint salesgraphdata_PKC primary key (GraphDataCode,ConstructionPeriod,SalesDataDays)
2010 271 h-you
) comment '????O???t?f?[?^' ;
2011 198 h-you

2012
create index SalesGraphData_Idx1
2013
  on salesgraphdata(DisplayOrder);
2014

2015
create index SalesGraphData_idx2
2016
  on salesgraphdata(ConstructionPeriod);
2017

2018 271 h-you
-- ?????}?X?^
2019 325 h-you
drop table if exists securitymaster cascade;
2020 198 h-you

2021
create table securitymaster (
2022 271 h-you
  SecCode decimal(2,0) unsigned not null comment '???????'
2023
  , DisplayOrder decimal(2,0) not null comment '?\????'
2024
  , SecName varchar(60) not null comment '????????'
2025
  , SecRank decimal(1,0) not null comment '?????????N'
2026
  , SecRange decimal(1,0) not null comment '???????'
2027
  , GeneralAffairs decimal(1,0) not null comment '????????t???O'
2028
  , SelectBackColor varchar(8) not null comment '?I??w?i?F'
2029
  , EntryDate datetime not null comment '?o?^???t'
2030
  , UpdateDate datetime not null comment '?X?V???t'
2031 198 h-you
  , constraint securitymaster_PKC primary key (SecCode)
2032 271 h-you
) comment '?????}?X?^' ;
2033 198 h-you

2034
create index SecurityMaster_Index1
2035
  on securitymaster(DisplayOrder);
2036

2037
create index SecurityMaster_Index2
2038
  on securitymaster(SecRank);
2039

2040
create index SecurityMaster_Index3
2041
  on securitymaster(SecRange);
2042

2043 271 h-you
-- ???S?p?g???[???f?[?^
2044 325 h-you
drop table if exists sfpdata cascade;
2045 239 h-you

2046
create table sfpdata (
2047 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2048
  , DataCount decimal(2,0) unsigned not null comment '?p?g???[????'
2049
  , RequestDate datetime not null comment '?p?g???[???v??????'
2050
  , PersonCode decimal(8,0) unsigned not null comment '?\????R?[?h'
2051
  , StringValue varchar(300) comment '?R?????g'
2052
  , OrderNo decimal(2,0) unsigned not null comment '?\????t???'
2053
  , EntryDate datetime not null comment '?o?^???t'
2054
  , UpdateDate datetime not null comment '?X?V???t'
2055 239 h-you
  , constraint sfpdata_PKC primary key (ConstructionCode,DataCount)
2056 271 h-you
) comment '???S?p?g???[???f?[?^' ;
2057 239 h-you

2058
create index SFPData_Index1
2059
  on sfpdata(RequestDate);
2060

2061 271 h-you
-- ???S?p?g???[??????f?[?^
2062 325 h-you
drop table if exists sfpdatadetail cascade;
2063 239 h-you

2064
create table sfpdatadetail (
2065 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2066
  , DataCount decimal(2,0) unsigned not null comment '?p?g???[????'
2067
  , SeqNo decimal(2,0) unsigned not null comment '?f?[?^?}??'
2068
  , CompanyCode decimal(8,0) unsigned not null comment '??????R?[?h'
2069
  , EntryDate datetime not null comment '?o?^???t'
2070
  , UpdateDate datetime not null comment '?X?V???t'
2071 239 h-you
  , constraint sfpdatadetail_PKC primary key (ConstructionCode,DataCount,SeqNo)
2072 271 h-you
) comment '???S?p?g???[??????f?[?^' ;
2073 239 h-you

2074 271 h-you
-- ??????{?H?H??o?^?\???f?[?^
2075 325 h-you
drop table if exists subconstrjobitemregist cascade;
2076 198 h-you

2077
create table subconstrjobitemregist (
2078 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '?\??????'
2079
  , CreateDate date not null comment '????'
2080
  , SeqNo decimal(2,0) unsigned not null comment '?\???A??'
2081
  , DisplayOrder decimal(8,0) unsigned not null comment '?\????'
2082
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
2083
  , EntryDate datetime not null comment '?o?^???t'
2084
  , UpdateDate datetime not null comment '?X?V???t'
2085 198 h-you
  , constraint subconstrjobitemregist_PKC primary key (PersonCode,CreateDate,SeqNo,DisplayOrder)
2086 271 h-you
) comment '??????{?H?H??o?^?\???f?[?^' ;
2087 198 h-you

2088 271 h-you
-- ??????E?????N?o?^?\???f?[?^
2089 325 h-you
drop table if exists subconstrjoblinkregist cascade;
2090 198 h-you

2091
create table subconstrjoblinkregist (
2092 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '?\??????'
2093
  , CreateDate date not null comment '????'
2094
  , SeqNo decimal(2,0) unsigned not null comment '?\???A??'
2095
  , DisplayOrder decimal(8,0) unsigned not null comment '?\????'
2096
  , JobCategoryCode decimal(5,0) not null comment '?E??L?['
2097
  , EntryDate datetime not null comment '?o?^???t'
2098
  , UpdateDate datetime not null comment '?X?V???t'
2099 198 h-you
  , constraint subconstrjoblinkregist_PKC primary key (PersonCode,CreateDate,SeqNo,DisplayOrder)
2100 271 h-you
) comment '??????E?????N?o?^?\???f?[?^' ;
2101 198 h-you

2102 271 h-you
-- ??????o?^?\???f?[?^
2103 325 h-you
drop table if exists subconstrregist cascade;
2104 198 h-you

2105
create table subconstrregist (
2106 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '?\??????'
2107
  , CreateDate date not null comment '????'
2108
  , SeqNo decimal(2,0) unsigned not null comment '?\???A??'
2109
  , DataMode decimal(1,0) comment '?f?[?^??'
2110
  , SourceCode decimal(8,0) not null comment '??????R?[?h'
2111
  , PetitionPeriod decimal(4,0) unsigned not null comment '?\???N?x'
2112
  , CorporateStatusName varchar(40) comment '?@?l?i????'
2113
  , CorporateStatusPoint decimal(1,0) not null comment '?@?l?i?????u'
2114
  , CompanyName varchar(100) not null comment '???????'
2115
  , CEOPositionName varchar(60) comment '??\???E??'
2116
  , CEOName varchar(60) comment '??\?????'
2117
  , ContactPersonName varchar(60) comment '?S???????'
2118
  , ZipCode varchar(8) comment '?X????'
2119
  , Address1 varchar(60) comment '?Z???P'
2120
  , Address2 varchar(60) comment '?Z??2'
2121
  , Address3 varchar(60) comment '?Z??3'
2122
  , CellPhoneNumber varchar(13) comment '?g??d?b???'
2123
  , MailAddress varchar(257) comment '???[???A?h???X'
2124
  , PhoneNumber varchar(13) comment '?d?b???'
2125
  , FaxNumber varchar(13) comment 'FAX???'
2126
  , JapaneseSyllabary varchar(2) comment '50?????'
2127
  , StartDate date not null comment '????J?n?N????'
2128
  , Note varchar(300) comment '???l'
2129
  , labourKind decimal(1,0) not null comment '?x???????E????'
2130
  , OrderDate date comment '?\????'
2131
  , OrderNo decimal(2,0) unsigned not null comment '?\????t???'
2132
  , EntryDate datetime not null comment '?o?^???t'
2133
  , UpdateDate datetime not null comment '?X?V???t'
2134 198 h-you
  , constraint subconstrregist_PKC primary key (PersonCode,CreateDate,SeqNo)
2135 271 h-you
) comment '??????o?^?\???f?[?^' ;
2136 198 h-you

2137 271 h-you
-- ??????H??}?X?^
2138 325 h-you
drop table if exists subcontractoritemmaster cascade;
2139 198 h-you

2140
create table subcontractoritemmaster (
2141 271 h-you
  ItemCode decimal(5,0) unsigned not null comment '?H??L?['
2142
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2143
  , ItemName varchar(120) not null comment '?H????'
2144
  , DeleteFlg decimal(1,0) not null comment '???t???O'
2145
  , EntryDate datetime not null comment '?o?^???t'
2146
  , UpdateDate datetime not null comment '?X?V???t'
2147 198 h-you
  , constraint subcontractoritemmaster_PKC primary key (ItemCode)
2148 271 h-you
) comment '??????H??}?X?^' ;
2149 198 h-you

2150 271 h-you
-- ??????E??}?X?^
2151 325 h-you
drop table if exists subcontractorjobcategory cascade;
2152 198 h-you

2153
create table subcontractorjobcategory (
2154 271 h-you
  JobCategoryCode decimal(5,0) not null comment '?E??L?['
2155
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2156
  , JobCategoryName varchar(120) not null comment '?E????'
2157
  , DeleteFlg decimal(1,0) not null comment '???t???O'
2158
  , EntryDate datetime not null comment '?o?^???t'
2159
  , UpdateDate datetime not null comment '?X?V???t'
2160 198 h-you
  , constraint subcontractorjobcategory_PKC primary key (JobCategoryCode)
2161 271 h-you
) comment '??????E??}?X?^' ;
2162 198 h-you

2163 271 h-you
-- ??????{?H?H??f?[?^
2164 325 h-you
drop table if exists subcontractorjobitem cascade;
2165 198 h-you

2166
create table subcontractorjobitem (
2167 271 h-you
  CompanyCode decimal(8,0) not null comment '??????R?[?h'
2168
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
2169
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2170
  , EntryDate datetime not null comment '?o?^???t'
2171
  , UpdateDate datetime not null comment '?X?V???t'
2172 198 h-you
  , constraint subcontractorjobitem_PKC primary key (CompanyCode,ItemCode)
2173 271 h-you
) comment '??????{?H?H??f?[?^' ;
2174 198 h-you

2175
create index SubContractorJobItem_Index1
2176
  on subcontractorjobitem(CompanyCode);
2177

2178
create index SubContractorJobItem_Index2
2179
  on subcontractorjobitem(ItemCode);
2180

2181 271 h-you
-- ??????E?????N?}?X?^
2182 325 h-you
drop table if exists subcontractorjoblink cascade;
2183 198 h-you

2184
create table subcontractorjoblink (
2185 271 h-you
  CompanyCode decimal(8,0) not null comment '??????R?[?h'
2186
  , JobCategoryCode decimal(5,0) not null comment '?E??L?['
2187
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2188
  , EntryDate datetime not null comment '?o?^???t'
2189
  , UpdateDate datetime not null comment '?X?V???t'
2190 198 h-you
  , constraint subcontractorjoblink_PKC primary key (CompanyCode,JobCategoryCode)
2191 271 h-you
) comment '??????E?????N?}?X?^' ;
2192 198 h-you

2193
create index SubContractorJobLink_Index1
2194
  on subcontractorjoblink(CompanyCode);
2195

2196
create index SubContractorJobLink_Index2
2197
  on subcontractorjoblink(JobCategoryCode);
2198

2199 271 h-you
-- ??????}?X?^
2200 325 h-you
drop table if exists subcontractormaster cascade;
2201 198 h-you

2202
create table subcontractormaster (
2203 271 h-you
  CompanyCode decimal(8,0) not null comment '??????R?[?h'
2204
  , DisplayOrder decimal(8,0) unsigned not null comment '?\????'
2205
  , CorporateStatusName varchar(40) comment '?@?l?i????'
2206
  , CorporateStatusPoint decimal(1,0) not null comment '?@?l?i?????u'
2207
  , CompanyName varchar(100) not null comment '???????'
2208
  , CEOPositionName varchar(60) comment '??\???E??'
2209
  , CEOName varchar(60) comment '??\?????'
2210
  , ContactPersonName varchar(60) comment '?S???????'
2211
  , ZipCode varchar(8) comment '?X????'
2212
  , Address1 varchar(60) comment '?Z???P'
2213
  , Address2 varchar(60) comment '?Z??2'
2214
  , Address3 varchar(60) comment '?Z??3'
2215
  , CellPhoneNumber varchar(13) comment '?g??d?b???'
2216
  , MailAddress varchar(257) comment '???[???A?h???X'
2217
  , PhoneNumber varchar(13) comment '?d?b???'
2218
  , FaxNumber varchar(13) comment 'FAX???'
2219
  , JapaneseSyllabary varchar(2) comment '50?????'
2220
  , StartDate date not null comment '????J?n?N????'
2221
  , Note varchar(300) comment '???l'
2222
  , labourKind decimal(1,0) not null comment '?x???????E????'
2223
  , DeleteFlg decimal(1,0) default '0' not null comment '???t???O'
2224
  , EntryDate datetime not null comment '?o?^???t'
2225
  , UpdateDate datetime not null comment '?X?V???t'
2226 198 h-you
  , constraint subcontractormaster_PKC primary key (CompanyCode)
2227 271 h-you
) comment '??????}?X?^' ;
2228 198 h-you

2229
create index SubContractorMaster_Index1
2230
  on subcontractormaster(JapaneseSyllabary);
2231

2232 271 h-you
-- ?d????}?X?^
2233 325 h-you
drop table if exists suppliersmaster cascade;
2234 198 h-you

2235
create table suppliersmaster (
2236 271 h-you
  SuppliersCode decimal(5,0) unsigned not null comment '?d????R?[?h'
2237
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2238
  , SuppliersName1 varchar(60) not null comment '?d????1'
2239
  , SuppliersName2 varchar(60) comment '?d?????Q'
2240
  , ZipCode varchar(8) comment '?X????'
2241
  , Address1 varchar(60) comment '?Z???P'
2242
  , Address2 varchar(60) comment '?Z??2'
2243
  , Address3 varchar(60) comment '?Z??3'
2244
  , PhoneNumber varchar(13) comment '?d?b???'
2245
  , FaxNumber varchar(13) comment 'FAX???'
2246
  , Note varchar(300) comment '???l'
2247
  , DeleteFlg decimal(1,0) not null comment '???t???O'
2248
  , EntryDate datetime not null comment '?o?^???t'
2249
  , UpdateDate datetime not null comment '?X?V???t'
2250 198 h-you
  , constraint suppliersmaster_PKC primary key (SuppliersCode)
2251 271 h-you
) comment '?d????}?X?^' ;
2252 198 h-you

2253 271 h-you
-- ?V?X?e???N???m?F?f?[?^
2254 325 h-you
drop table if exists systemexecute cascade;
2255 198 h-you

2256
create table systemexecute (
2257 271 h-you
  PrimaryCode tinyint(4) not null comment '?L?[????'
2258
  , TargetDate date not null comment '?N?????t'
2259
  , SystemVersion int(11) not null comment '?{??E????o?[?W????'
2260
  , UpDateCopyVersion int(11) not null comment '?R?s?[?o?[?W????'
2261
  , EntryDate datetime not null comment '?o?^???t'
2262
  , UpdateDate datetime not null comment '?X?V???t'
2263 198 h-you
  , constraint systemexecute_PKC primary key (PrimaryCode)
2264 271 h-you
) comment '?V?X?e???N???m?F?f?[?^' ;
2265 198 h-you

2266 271 h-you
-- ????}?X?^
2267 325 h-you
drop table if exists systemmaster cascade;
2268 198 h-you

2269
create table systemmaster (
2270 271 h-you
  SystemCode decimal(3,0) unsigned not null comment '???R?[?h'
2271
  , CompanyName1 varchar(60) not null comment '?????P'
2272
  , CompanyName2 varchar(60) comment '?????Q'
2273
  , CEOName varchar(60) not null comment '??\?????'
2274
  , CEOPositionName varchar(60) comment '??\???E??'
2275
  , ZipCode varchar(8) not null comment '?X????'
2276
  , Address1 varchar(60) not null comment '?Z???P'
2277
  , Address2 varchar(60) comment '?Z??2'
2278
  , Address3 varchar(60) comment '?Z??3'
2279
  , PhoneNumber varchar(13) not null comment '?d?b???'
2280
  , FaxNumber varchar(13) comment 'FAX???'
2281
  , HomePageURL varchar(120) comment '?z?[???y?[?WURL'
2282
  , ConsumptionTax decimal(4,2) not null comment '?????'
2283
  , CooperationRate decimal(4,2) not null comment '???????'
2284
  , StatutoryWelfareRate decimal(4,2) not null comment '?@???????'
2285
  , FuelPrice decimal(5,2) not null comment '?R???L???P??'
2286
  , AreaDistance decimal(5,2) not null comment '????u????????'
2287
  , ExcelSavePath varchar(120) comment 'Excel????p?X'
2288
  , BusinessPeriod smallint(6) not null comment '????c?????'
2289 324 h-you
  , ConstrYear smallint(6) not null comment '????H???N?x'
2290
  , BusinessBeginDate datetime not null comment '?c????????'
2291
  , ConstrBeginDate datetime not null comment '?H???N?x?????'
2292
  , BusinessCompDate datetime not null comment '?c?????????'
2293
  , ConstrCompDate datetime not null comment '?H???N?x??????'
2294 271 h-you
  , ConstructionNoBase decimal(1,0) not null comment '?H????????l'
2295
  , SloganString1 varchar(100) comment '?W??1'
2296
  , SloganString2 varchar(100) comment '?W??2'
2297
  , SloganString3 varchar(100) comment '?W??3'
2298
  , EntryDate datetime not null comment '?o?^???t'
2299
  , UpdateDate datetime not null comment '?X?V???t'
2300 198 h-you
  , constraint systemmaster_PKC primary key (SystemCode)
2301 271 h-you
) comment '????}?X?^' ;
2302 198 h-you

2303 271 h-you
-- ?????}?X?^
2304 325 h-you
drop table if exists termmaster cascade;
2305 198 h-you

2306
create table termmaster (
2307 271 h-you
  ConstructionStatusFlg decimal(2,0) not null comment '?H?????t???O'
2308
  , FieldNo decimal(2,0) not null comment '?`?F?b?N???t?B?[???h???'
2309
  , SeqNo decimal(2,0) not null comment '?}??'
2310
  , DisplayOrder decimal(2,0) not null comment '?\????'
2311
  , CheckSchdule decimal(1,0) not null comment '?`?F?b?N?^?C?~???O'
2312
  , TermDays decimal(3,0) not null comment '?o???'
2313
  , SendTitile varchar(100) comment '?^?C?g??'
2314
  , SendMessage varchar(100) comment '???b?Z?[?W'
2315
  , BackColor varchar(8) comment '?w?i?F'
2316
  , ForeColor varchar(8) comment '?????F'
2317
  , EntryDate datetime not null comment '?o?^???t'
2318
  , UpdateDate datetime not null comment '?X?V???t'
2319 198 h-you
  , constraint termmaster_PKC primary key (ConstructionStatusFlg,FieldNo,SeqNo)
2320 271 h-you
) comment '?????}?X?^' ;
2321 198 h-you

2322
create index TermMaster_Index1
2323
  on termmaster(DisplayOrder);
2324

2325 271 h-you
-- ?o?????f?[?^
2326 325 h-you
drop table if exists tranceportdailydata cascade;
2327 198 h-you

2328
create table tranceportdailydata (
2329 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
2330
  , AttendanceDate date not null comment '???????'
2331
  , StartDistance decimal(7,1) not null comment '?????o???L????'
2332
  , ComplateDistance decimal(7,1) not null comment '?????I???L????'
2333
  , TotalDistance decimal(6,1) not null comment '???????v?L????'
2334
  , OfficeGoFlg decimal(1,0) not null comment '???????o??t???O'
2335
  , OfficeOutFlg decimal(1,0) not null comment '???????A??t???O'
2336
  , TrancePayGoFlg decimal(1,0) not null comment '?L?????o??t???O'
2337
  , TrancePayOutFlg decimal(1,0) not null comment '?L?????A??t???O'
2338
  , WareHouseFlg decimal(1,0) not null comment '????u??t???O'
2339
  , EntryDate datetime not null comment '?o?^???t'
2340
  , UpdateDate datetime not null comment '?X?V???t'
2341 198 h-you
  , constraint tranceportdailydata_PKC primary key (PersonCode,AttendanceDate)
2342 271 h-you
) comment '?o?????f?[?^' ;
2343 198 h-you

2344
create index TranceportDailyData_Index1
2345
  on tranceportdailydata(AttendanceDate);
2346

2347 271 h-you
-- ?H?????o???}?X?^
2348 325 h-you
drop table if exists typeexpensesmaster cascade;
2349 198 h-you

2350
create table typeexpensesmaster (
2351 271 h-you
  TypeCode decimal(5,0) unsigned not null comment '?H?????R?[?h'
2352
  , ExpensesPeriod smallint(6) not null comment '?????'
2353
  , NameCode decimal(5,0) unsigned not null comment '?o????R?[?h'
2354
  , ExpensesRaito decimal(4,2) not null comment '?o??'
2355
  , DeleteFlg decimal(1,0) not null comment '???t???O'
2356
  , EntryDate datetime not null comment '?o?^???t'
2357
  , UpdateDate datetime not null comment '?X?V???t'
2358 198 h-you
  , constraint typeexpensesmaster_PKC primary key (TypeCode,ExpensesPeriod,NameCode)
2359 271 h-you
) comment '?H?????o???}?X?^' ;
2360 198 h-you

2361 271 h-you
-- ?P??}?X?^
2362 325 h-you
drop table if exists unitmaster cascade;
2363 198 h-you

2364
create table unitmaster (
2365 271 h-you
  UnitKey decimal(5,0) unsigned not null comment '?P??L?['
2366
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2367
  , UnitName varchar(30) not null comment '?P?????'
2368
  , EntryDate datetime not null comment '?o?^???t'
2369
  , UpdateDate datetime not null comment '?X?V???t'
2370 198 h-you
  , constraint unitmaster_PKC primary key (UnitKey)
2371 271 h-you
) comment '?P??}?X?^' ;
2372 198 h-you

2373
create index UnitMaster_Index1
2374
  on unitmaster(DisplayOrder);
2375

2376 271 h-you
-- ????}?X?^
2377 325 h-you
drop table if exists vehiclemaster cascade;
2378 198 h-you

2379
create table vehiclemaster (
2380 271 h-you
  VehicleCode decimal(5,0) unsigned not null comment '????R?[?h'
2381
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2382
  , VehicleName varchar(100) not null comment '???????'
2383
  , RegistrationNumber varchar(30) comment '?o?^???'
2384
  , IdentificationNumber varchar(30) comment '?????'
2385
  , ModelCode varchar(30) comment '?^??'
2386
  , DepartmentCode decimal(5,0) unsigned not null comment '???????'
2387
  , VehicleScheduleFlg decimal(1,0) not null comment '????\??\???t???O'
2388
  , PurchaseDate date comment '?w????'
2389
  , PurchaseName varchar(30) comment '?w????'
2390
  , PurchaseContactPersons varchar(30) comment '?w????S????'
2391
  , PurchasePhone varchar(13) comment '?w????d?b???'
2392
  , LeaseDate date comment '???[?X?J?n??'
2393
  , LeaseDestination varchar(30) comment '???[?X??'
2394
  , LeaseContactPersons varchar(30) comment '???[?X??S????'
2395
  , LeasePhone varchar(13) comment '???[?X??d?b???'
2396
  , InsuranceCompany varchar(30) comment '?C???????'
2397
  , InsuranceContactPersons varchar(30) comment '?C???????S????'
2398
  , InsurancePhone varchar(13) comment '?C???????d?b???'
2399
  , Note varchar(300) comment '???l'
2400
  , EntryDate datetime comment '?o?^???t'
2401
  , UpdateDate datetime comment '?X?V???t'
2402 198 h-you
  , constraint vehiclemaster_PKC primary key (VehicleCode)
2403 271 h-you
) comment '????}?X?^' ;
2404 198 h-you

2405 271 h-you
-- ????L?^?f?[?^
2406 325 h-you
drop table if exists vehiclerecorddata cascade;
2407 198 h-you

2408
create table vehiclerecorddata (
2409 271 h-you
  VehicleCode decimal(5,0) unsigned not null comment '????R?[?h'
2410
  , DivisionCode decimal(2,0) unsigned not null comment '?f?[?^??'
2411
  , SeqNo decimal(2,0) not null comment '?}??'
2412
  , RecordDate date comment '???n??'
2413
  , Mileage mediumint(9) comment '???s????'
2414
  , Content varchar(100) comment '???e'
2415
  , PaymentCost decimal(10,0) comment '??p'
2416
  , EntryDate datetime not null comment '?o?^???t'
2417
  , UpdateDate datetime not null comment '?X?V???t'
2418 198 h-you
  , constraint vehiclerecorddata_PKC primary key (VehicleCode,DivisionCode,SeqNo)
2419 271 h-you
) comment '????L?^?f?[?^' ;
2420 198 h-you

2421 271 h-you
-- ????\??f?[?^
2422 325 h-you
drop table if exists vehiclescheduledata cascade;
2423 198 h-you

2424
create table vehiclescheduledata (
2425 271 h-you
  TargetDate date not null comment '????'
2426
  , VehicleCode decimal(5,0) unsigned not null comment '????R?[?h'
2427
  , MorningAfternoon decimal(1,0) not null comment '??O?E???'
2428
  , PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
2429
  , TargetYear year(4) not null comment '?Y???N'
2430
  , TargetMonth tinyint(3) unsigned not null comment '?Y????'
2431
  , TargetDay year(4) not null comment '?Y????'
2432
  , EntryDate datetime not null comment '?o?^???t'
2433
  , UpdateDate datetime not null comment '?X?V???t'
2434 198 h-you
  , constraint vehiclescheduledata_PKC primary key (TargetDate,VehicleCode,MorningAfternoon)
2435 271 h-you
) comment '????\??f?[?^' ;
2436 198 h-you

2437
create index VehicleScheduleData_Index1
2438
  on vehiclescheduledata(TargetYear);
2439

2440
create index VehicleScheduleData_Index2
2441
  on vehiclescheduledata(TargetMonth);
2442

2443
create index VehicleScheduleData_Index3
2444
  on vehiclescheduledata(TargetDay);
2445

2446 271 h-you
-- ?N?}?X?^
2447 325 h-you
drop table if exists yearmaster cascade;
2448 198 h-you

2449
create table yearmaster (
2450 271 h-you
  years smallint(6) not null comment '?N'
2451
) comment '?N?}?X?^' ;
2452 198 h-you

2453
create index year_Index1
2454
  on yearmaster(years);