プロジェクト

全般

プロフィール

統計
| リビジョン:

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

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

1 198 h-you
-- Project Name : noname
2 342 h-you
-- Date/Time    : 2018/04/12 9:06:32
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 342 h-you
-- ?H???????o??f?[?^
466
drop table if exists constrledgerexpenses cascade;
467
468
create table constrledgerexpenses (
469
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
470
  , SeqNo decimal(5,0) not null comment '?}??'
471
  , NameCode decimal(5,0) unsigned not null comment '?o??R?[?h'
472
  , ExpensesRaito decimal(4,2) not null comment '?o??'
473
  , ExpensesValue decimal(10,0) not null comment '?o????z'
474
  , EntryDate datetime not null comment '?o?^???t'
475
  , UpdateDate datetime not null comment '?X?V???t'
476
  , constraint constrledgerexpenses_PKC primary key (ConstructionCode,SeqNo,NameCode)
477
) comment '?H???????o??f?[?^' ;
478
479
create index ConstrLedgerExpenses_Index1
480
  on constrledgerexpenses(ConstructionCode);
481
482
create index ConstrLedgerExpenses_Index2
483
  on constrledgerexpenses(SeqNo);
484
485
create index ConstrLedgerExpenses_Index3
486
  on constrledgerexpenses(NameCode);
487
488 271 h-you
-- ?H????{???
489 325 h-you
drop table if exists constructionbaseinfo cascade;
490 84 h-you
491 198 h-you
create table constructionbaseinfo (
492 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
493
  , TyingFlg decimal(1,0) not null comment '?R?t?f?[?^?t???O'
494
  , JoinFlg decimal(1,0) not null comment '?????_??H???t???O'
495
  , ConstructionYear smallint(5) unsigned not null comment '?H???N?x'
496
  , ConstructionPeriod smallint(5) unsigned not null comment '?H??????'
497
  , RequestedDate date comment '??????'
498
  , EstimatesSubmitDeadline date comment '?????o????'
499
  , EstimatesSubmittedDate date comment '?????o??'
500
  , ProvisionalOrderDate date comment '?????'
501
  , OrderDate date comment '???'
502
  , OrderStartingDate date comment '?J?n?\???'
503
  , OrderCompletionDate date comment '?????\???'
504
  , PreparationStartDate date comment '?{?H?????J?n??'
505
  , ConstructionStartingDate date comment '?{?H?J?n??'
506
  , ConstructionCompletionDate date comment '?{?H??????'
507
  , NonOrderDate date comment '????'
508
  , OrdersDecisionPrice decimal(12,0) not null comment '??????????z'
509
  , OrdersDecisionPriceInTax decimal(12,0) not null comment '??????????z'
510 332 h-you
  , SalesDepCode decimal(5,0) unsigned not null comment '?c??S????????R?[?h'
511
  , SalesPersonCode decimal(8,0) unsigned not null comment '?c??S????R?[?h'
512 338 h-you
  , SalesSubDepCode decimal(5,0) unsigned not null comment '?c????S????????R?[?h'
513
  , SalesSubPersonCode decimal(8,0) unsigned not null comment '?c????S????R?[?h'
514 332 h-you
  , ConstrDepCode decimal(5,0) unsigned not null comment '?H???S????????R?[?h'
515
  , ConstructionPersonCode decimal(8,0) not null comment '?H???S????R?[?h'
516
  , ConstrSubDepCode decimal(5,0) unsigned not null comment '?H?????S????????R?[?h'
517
  , ConstrSubPersonCode decimal(8,0) not null comment '?H?????S????R?[?h'
518
  , ConstrInstrDepCode decimal(5,0) unsigned not null comment '?H???w?????????R?[?h'
519
  , ConstructionInstructor decimal(8,0) not null comment '?H???w?????R?[?h'
520 271 h-you
  , TransferConstruction decimal(8,0) not null comment '?H??????R?[?h'
521
  , TransferConstructionDate date comment '?H??????'
522 332 h-you
  , OrderersDivision decimal(5,0) not null comment '????????R?[?h'
523 271 h-you
  , OrderersCode decimal(5,0) unsigned not null comment '??????R?[?h'
524
  , EstimatesExpirationDate date comment '????L??????'
525
  , ConstructionPeriodStart date comment '?_??H???J?n??'
526
  , ConstructionPeriodEnd date comment '?_??H??????'
527
  , ConstructionPeriodStart2 date comment '?_??H???J?n?i???????j'
528
  , ConstructionPeriodEnd2 date comment '?_??H???????i???????j'
529
  , StartDate date comment '?H???J?n??'
530
  , EndDate date comment '?H???I????'
531
  , PurchaseOrderMailingDate date comment '???????X????'
532
  , PurchaseOrderReturnDate date comment '???????????'
533
  , PurchaseOrderReturnCheckDate date comment '??????????m?F??'
534
  , ConsumptionTaxFlg decimal(1,0) not null comment '?????t???O'
535
  , PrimeContractorFlg decimal(1,0) not null comment '?????t???O'
536
  , SalesCostFlg decimal(1,0) not null comment '?c??o?????t???O'
537
  , ConstructionStatusFlg decimal(2,0) not null comment '?H?????t???O'
538
  , ConstructionType decimal(5,0) not null comment '?H?????R?[?h'
539
  , EstimateType decimal(1,0) not null comment '??????'
540
  , BillingStartDate date not null comment '?????????J?n??'
541
  , BillingDate date not null comment '??????'
542
  , BillingSplitFlg decimal(1,0) not null comment '??????t???O'
543
  , BillingSendDate date comment '???????X??/??n????'
544
  , LedgerComplateDate date not null comment '?H????????????????t'
545 322 h-you
  , InspectPlanningDate date not null comment '?????\???'
546
  , InspectExecuteDate date not null comment '???????s??'
547
  , RevCompleteDate date not null comment '??????????????'
548 271 h-you
  , EntryDate datetime not null comment '?o?^???t'
549
  , UpdateDate datetime not null comment '?X?V???t'
550 198 h-you
  , constraint constructionbaseinfo_PKC primary key (ConstructionCode)
551 271 h-you
) comment '?H????{???' ;
552 84 h-you
553 198 h-you
create index BaseInfo_Index1
554
  on constructionbaseinfo(ConstructionStatusFlg);
555 84 h-you
556 198 h-you
create index BaseInfo_Index2
557
  on constructionbaseinfo(EstimateType);
558 84 h-you
559 198 h-you
create index BaseInfo_Index3
560
  on constructionbaseinfo(SalesPersonCode);
561 84 h-you
562 198 h-you
create index BaseInfo_Index4
563
  on constructionbaseinfo(ConstructionPersonCode);
564 84 h-you
565 198 h-you
create index BaseInfo_Index5
566
  on constructionbaseinfo(ConstructionInstructor);
567 84 h-you
568 198 h-you
create index BaseInfo_Index6
569
  on constructionbaseinfo(ConstructionPeriod);
570 84 h-you
571 271 h-you
-- ?H????{????
572 325 h-you
drop table if exists constructionbaseinfodetail cascade;
573 84 h-you
574 198 h-you
create table constructionbaseinfodetail (
575 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
576 332 h-you
  , DetailNo decimal(3,0) not null comment '??????'
577 322 h-you
  , DetailString varchar(300) comment '??????e'
578 271 h-you
  , EntryDate datetime not null comment '?o?^???t'
579
  , UpdateDate datetime not null comment '?X?V???t'
580 198 h-you
  , constraint constructionbaseinfodetail_PKC primary key (ConstructionCode,DetailNo)
581 271 h-you
) comment '?H????{????' ;
582 84 h-you
583 198 h-you
create index BaseInfoDetail_Idx1
584
  on constructionbaseinfodetail(ConstructionCode);
585 84 h-you
586 198 h-you
create index BaseInfoDetail_Idx2
587
  on constructionbaseinfodetail(DetailNo);
588 84 h-you
589 271 h-you
-- ?H???{?H?\?Z?f?[?^
590 325 h-you
drop table if exists constructionbudget cascade;
591 84 h-you
592 198 h-you
create table constructionbudget (
593 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
594
  , CreatorCode decimal(8,0) not null comment '????R?[?h'
595
  , CreatorName varchar(60) comment '?????'
596
  , CreatorCosts decimal(11,0) not null comment '??????^'
597
  , AssistantCode decimal(8,0) not null comment '???S????R?[?h'
598
  , AssistantName varchar(60) comment '???S?????'
599
  , AssistantCosts decimal(11,0) not null comment '???S??????^'
600
  , InstructorCode decimal(8,0) not null comment '?H???w?????R?[?h'
601
  , InstructorName varchar(60) comment '?H???w??????'
602
  , InstructorCosts decimal(11,0) not null comment '?H???w???????^'
603
  , CreateDate date not null comment '????'
604
  , ConstructionTimes decimal(5,2) not null comment '?H???i?P??E???j'
605
  , ConstructionStart date not null comment '?_??H???J?n'
606
  , ConstructionEnd date not null comment '?_??H??????'
607
  , InstructorTimes decimal(5,2) not null comment '?w???????????'
608
  , SalaryFlg decimal(1,0) not null comment '???^?U????'
609
  , SalaryDays decimal(4,0) not null comment '?U??????'
610
  , A_SalaryFlg decimal(1,0) not null comment '???S??????^?U????'
611
  , A_SalaryDays decimal(4,0) not null comment '???S????U??????'
612
  , I_SalaryFlg decimal(1,0) not null comment '?w???????^?U????'
613
  , I_SalaryDays decimal(4,0) not null comment '?w?????U??????'
614
  , OrdersDecisionPrice decimal(12,0) not null comment '??????????z'
615
  , EntryDate datetime not null comment '?o?^???t'
616
  , UpdateDate datetime not null comment '?X?V???t'
617 198 h-you
  , constraint constructionbudget_PKC primary key (ConstructionCode)
618 271 h-you
) comment '?H???{?H?\?Z?f?[?^' ;
619 84 h-you
620 271 h-you
-- ?H???{?H?\?Z?f?[?^????
621 325 h-you
drop table if exists constructionbudgetdetail cascade;
622 84 h-you
623 198 h-you
create table constructionbudgetdetail (
624 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
625
  , GroupCount decimal(2,0) unsigned not null comment '?O???[?v???'
626
  , LineCount decimal(3,0) unsigned not null comment '?s???'
627
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
628
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
629
  , FirstString varchar(120) comment '???????'
630
  , SecondString varchar(120) comment '?H?????e'
631
  , CompanyType decimal(1,0) not null comment '??????R?[?h?^?C?v'
632
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
633
  , CompanyName varchar(120) comment '?????????'
634
  , EstimatePrice decimal(12,0) not null comment '??Z????????z'
635
  , NegotiationPrice decimal(12,0) not null comment '??Z????????z'
636
  , OrderDesiredAmount decimal(12,0) not null comment '??????]???z'
637
  , ExecutionAmount decimal(12,0) not null comment '???s???z'
638
  , AmountConfigRate decimal(5,2) not null comment '???z?\????'
639
  , NegotiateFlg decimal(1,0) not null comment '?????????t???O'
640
  , EntryDate datetime not null comment '?o?^???t'
641
  , UpdateDate datetime not null comment '?X?V???t'
642 198 h-you
  , constraint constructionbudgetdetail_PKC primary key (ConstructionCode,GroupCount,LineCount)
643 271 h-you
) comment '?H???{?H?\?Z?f?[?^????' ;
644 84 h-you
645 271 h-you
-- ?H??}?X?^
646 325 h-you
drop table if exists constructionitemmaster cascade;
647 84 h-you
648 198 h-you
create table constructionitemmaster (
649 271 h-you
  ItemCode decimal(5,0) unsigned not null comment '?H??L?['
650
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
651
  , ItemName varchar(120) not null comment '?H????'
652
  , SubItemsFlg decimal(1,0) comment '???????t???O'
653
  , MyExpensesFlg decimal(1,0) not null comment '????o??t???O'
654
  , DeleteFlg decimal(1,0) not null comment '???t???O'
655
  , EntryDate datetime not null comment '?o?^???t'
656
  , UpdateDate datetime not null comment '?X?V???t'
657 198 h-you
  , constraint constructionitemmaster_PKC primary key (ItemCode)
658 271 h-you
) comment '?H??}?X?^' ;
659 84 h-you
660 271 h-you
-- ?H???????f?[?^
661 325 h-you
drop table if exists constructionledger cascade;
662 84 h-you
663 198 h-you
create table constructionledger (
664 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
665
  , ConstructionPeriod decimal(4,0) unsigned not null comment '?????'
666
  , CreatorCode decimal(8,0) comment '????R?[?h'
667
  , CreatorName varchar(60) comment '?????'
668
  , CreateDate date not null comment '????'
669
  , ConstructionTimes decimal(5,2) not null comment '?H???i?P??E???j'
670
  , ConstructionStart date not null comment '?_??H???J?n'
671
  , ConstructionEnd date not null comment '?_??H??????'
672
  , OrdersDecisionPrice decimal(14,0) not null comment '??????????z'
673
  , CompanyExpenses decimal(10,0) not null comment '???o???v'
674
  , DepartmentExpenses decimal(10,0) not null comment '?????o???v'
675
  , SalesExpenses decimal(10,0) not null comment '?c??o???v'
676
  , TotalPayment decimal(10,0) not null comment '???x???z'
677
  , GrossProfit decimal(10,0) not null comment '?e??'
678
  , Allowance decimal(10,0) not null comment '???^'
679
  , NetProfit decimal(10,0) not null comment '?????v'
680
  , ComplateFlg decimal(1,0) not null comment '????????t???O'
681
  , IntegrationFlg decimal(1,0) not null comment '????z??Z?t???O'
682
  , EntryDate datetime not null comment '?o?^???t'
683
  , UpdateDate datetime not null comment '?X?V???t'
684 198 h-you
  , constraint constructionledger_PKC primary key (ConstructionCode)
685 271 h-you
) comment '?H???????f?[?^' ;
686 84 h-you
687 338 h-you
create index constructionledger_Index1
688
  on constructionledger(ConstructionStart);
689
690
create index constructionledger_Index2
691
  on constructionledger(ConstructionEnd);
692
693 271 h-you
-- ?H??????????f?[?^
694 325 h-you
drop table if exists constructionledgerdetail cascade;
695 84 h-you
696 198 h-you
create table constructionledgerdetail (
697 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
698
  , GroupCount decimal(2,0) unsigned not null comment '?O???[?v???'
699 302 h-you
  , LineCount decimal(4,0) unsigned not null comment '?s???'
700 271 h-you
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
701
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
702
  , FirstString varchar(120) comment '???????'
703
  , SecondString varchar(120) comment '?H?????e'
704
  , CompanyType decimal(1,0) not null comment '??????R?[?h?^?C?v'
705
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
706
  , CompanyName varchar(120) comment '?????????'
707
  , EstimatePrice decimal(12,0) not null comment '?\?Z?i????j???z'
708
  , ExecutionAmount decimal(12,0) not null comment '???s???z'
709
  , AmountConfigRate decimal(5,2) not null comment '???z?\????'
710
  , PaymentBurden decimal(12,0) not null comment '?x????U?z'
711
  , FixDataFlg decimal(1,0) not null comment '???f?[?^?t???O'
712
  , IndependentFlg decimal(1,0) not null comment '????f?[?^?t???O'
713
  , FluctuationFlg decimal(1,0) not null comment '?????f?[?^?t???O'
714
  , SalaryFlg decimal(1,0) not null comment '???^?U????'
715
  , SalaryDays decimal(4,0) not null comment '???^?U??????'
716
  , OperatingFlg decimal(1,0) not null comment '?S?????t???O'
717
  , SourceCode decimal(10,0) unsigned not null comment '???H?????'
718
  , JoinTitleFlg decimal(1,0) not null comment '?H??????^?C?g??'
719
  , SalaryOnRegist decimal(12,0) not null comment '?o?^?????z???^'
720
  , PurchaseOrderFlg decimal(2,0) not null comment '?????????s?t???O'
721 302 h-you
  , DetailCount decimal(4,0) unsigned not null comment '??????'
722 271 h-you
  , EntryDate datetime not null comment '?o?^???t'
723
  , UpdateDate datetime not null comment '?X?V???t'
724 198 h-you
  , constraint constructionledgerdetail_PKC primary key (ConstructionCode,GroupCount,LineCount)
725 271 h-you
) comment '?H??????????f?[?^' ;
726 84 h-you
727 198 h-you
create index LedgerDetail_Index01
728
  on constructionledgerdetail(ConstructionCode);
729 84 h-you
730 198 h-you
create index LedgerDetail_Index02
731
  on constructionledgerdetail(GroupCount);
732 84 h-you
733 198 h-you
create index LedgerDetail_Index03
734 302 h-you
  on constructionledgerdetail(LineCount);
735
736
create index LedgerDetail_Index04
737 198 h-you
  on constructionledgerdetail(SourceCode);
738 84 h-you
739 302 h-you
create index LedgerDetail_Index05
740
  on constructionledgerdetail(DetailCount);
741
742 338 h-you
create index LedgerDetail_Index06
743
  on constructionledgerdetail(SalaryFlg);
744
745
create index LedgerDetail_Index07
746
  on constructionledgerdetail(CompanyCode);
747
748 271 h-you
-- ?H?????????s?f?[?^
749 325 h-you
drop table if exists constructionledgerexcute cascade;
750 84 h-you
751 198 h-you
create table constructionledgerexcute (
752 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
753
  , GroupCount decimal(2,0) unsigned not null comment '?O???[?v???'
754 302 h-you
  , LineCount decimal(4,0) unsigned not null comment '?s???'
755 271 h-you
  , ColumnCount decimal(3,0) not null comment '????'
756
  , PaymentAmount decimal(12,0) not null comment '?x?????z'
757
  , TargetMonth date not null comment '???N??'
758
  , EntryDate datetime not null comment '?o?^???t'
759
  , UpdateDate datetime not null comment '?X?V???t'
760 198 h-you
  , constraint constructionledgerexcute_PKC primary key (ConstructionCode,GroupCount,LineCount,ColumnCount)
761 271 h-you
) comment '?H?????????s?f?[?^' ;
762 84 h-you
763 198 h-you
create index LedgerExcute_Index1
764
  on constructionledgerexcute(ConstructionCode,TargetMonth,GroupCount,LineCount);
765 84 h-you
766 271 h-you
-- ?H???????N???
767 325 h-you
drop table if exists constructionlink cascade;
768 84 h-you
769 198 h-you
create table constructionlink (
770 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
771
  , FluctuationCode decimal(10,0) not null comment '?q?H?????'
772
  , LinkType decimal(1,0) not null comment '?????N???'
773
  , EntryDate datetime not null comment '?o?^???t'
774
  , UpdateDate datetime not null comment '?X?V???t'
775 198 h-you
  , constraint constructionlink_PKC primary key (ConstructionCode,FluctuationCode)
776 271 h-you
) comment '?H???????N???' ;
777 101 h-you
778 198 h-you
create index ConstructionLink_Index1
779
  on constructionlink(ConstructionCode);
780 101 h-you
781 198 h-you
create index ConstructionLink_Index2
782
  on constructionlink(FluctuationCode);
783 84 h-you
784 198 h-you
create index ConstructionLink_Index3
785
  on constructionlink(LinkType);
786 84 h-you
787 271 h-you
-- ?H????????
788 325 h-you
drop table if exists constructionmaterialinfo cascade;
789 84 h-you
790 198 h-you
create table constructionmaterialinfo (
791 271 h-you
  CONSTRUCTIONCODE int(10) unsigned default 0 not null comment '?H?????'
792
  , MATERIALITEMCODE smallint(5) unsigned default 0 not null comment '????i??R?[?h'
793 277 h-you
  , PROCESSDATE datetime default '0000-00-00 00:00:00' not null comment '?????N????'
794 271 h-you
  , RENTCOUNT smallint(5) unsigned comment '??o??'
795
  , REPAYCOUNT smallint(5) unsigned comment '??p??'
796 277 h-you
  , JUNKCOUNT smallint(5) unsigned comment '?j????'
797 271 h-you
  , COMPLETEFLG tinyint(3) unsigned comment '?????t???O'
798
  , ENTRYDATE datetime comment '?o?^???t'
799
  , UPDATEDATE datetime comment '?X?V???t'
800 277 h-you
  , constraint constructionmaterialinfo_PKC primary key (CONSTRUCTIONCODE,MATERIALITEMCODE,PROCESSDATE)
801 271 h-you
) comment '?H????????' ;
802 84 h-you
803 271 h-you
-- ????i?????t?f?[?^
804 325 h-you
drop table if exists constructionprogressdate cascade;
805 84 h-you
806 198 h-you
create table constructionprogressdate (
807 271 h-you
  ConstructionCode decimal(10,0) not null comment '?H?????'
808
  , ConstructionStatusFlg decimal(2,0) not null comment '???H?????'
809
  , PreviousStatusFlg decimal(2,0) comment '??X?O???'
810
  , ChangeDate datetime not null comment '?????t'
811
  , ChangePersonCode decimal(8,0) not null comment '???S????'
812
  , EntryDate datetime not null comment '?o?^???t'
813
  , UpdateDate datetime not null comment '?X?V???t'
814 342 h-you
  , constraint constructionprogressdate_PKC primary key (ConstructionCode,ChangeDate)
815 271 h-you
) comment '????i?????t?f?[?^' ;
816 84 h-you
817 342 h-you
create index ConstrProg_Index1
818
  on constructionprogressdate(ConstructionCode);
819
820
create index ConstrProg_Index2
821
  on constructionprogressdate(ConstructionStatusFlg);
822
823
create index ConstrProg_Index3
824
  on constructionprogressdate(ChangeDate);
825
826 271 h-you
-- ???}?X?^
827 325 h-you
drop table if exists constructionspecmaster cascade;
828 84 h-you
829 198 h-you
create table constructionspecmaster (
830 271 h-you
  ItemCode decimal(5,0) unsigned not null comment '?H??L?['
831
  , SpecCode decimal(5,0) unsigned not null comment '???L?['
832
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
833
  , ItemName varchar(120) comment '??????'
834
  , SpecName varchar(120) comment '??????'
835
  , UnitName varchar(30) comment '?P?????'
836
  , UnitPrice decimal(9,2) not null comment '?P??'
837
  , DeleteFlg decimal(1,0) not null comment '???t???O'
838
  , EntryDate datetime not null comment '?o?^???t'
839
  , UpdateDate datetime not null comment '?X?V???t'
840 198 h-you
  , constraint constructionspecmaster_PKC primary key (ItemCode,SpecCode)
841 271 h-you
) comment '???}?X?^' ;
842 84 h-you
843 198 h-you
create index ConstructionSpecMaster_Index1
844
  on constructionspecmaster(DisplayOrder);
845 84 h-you
846 271 h-you
-- ???P???}?X?^
847 325 h-you
drop table if exists constructionspecunitprice cascade;
848 84 h-you
849 198 h-you
create table constructionspecunitprice (
850 271 h-you
  ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
851
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
852
  , SpecCode decimal(5,0) unsigned not null comment '???L?['
853
  , ConstructionTypeCode mediumint(8) unsigned not null comment '?H?????R?[?h'
854
  , UnitPrice decimal(9,2) not null comment '?P??'
855
  , EntryDate datetime not null comment '?o?^???t'
856
  , UpdateDate datetime not null comment '?X?V???t'
857 198 h-you
  , constraint constructionspecunitprice_PKC primary key (ComponentCode,ItemCode,SpecCode,ConstructionTypeCode)
858 271 h-you
) comment '???P???}?X?^' ;
859 84 h-you
860 271 h-you
-- ?H?????}?X?^
861 325 h-you
drop table if exists constructiontypemaster cascade;
862 84 h-you
863 198 h-you
create table constructiontypemaster (
864 271 h-you
  TypeCode decimal(5,0) unsigned not null comment '?H?????R?[?h'
865
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
866
  , NameString varchar(100) not null comment '????'
867
  , PublicFlg decimal(1,0) not null comment '?H?????t???O'
868
  , SecRank decimal(1,0) not null comment '?????????N'
869
  , ExpensesLink decimal(1,0) not null comment '?o??g?p??'
870
  , DeleteFlg decimal(1,0) not null comment '???t???O'
871
  , EntryDate datetime not null comment '?o?^???t'
872
  , UpdateDate datetime not null comment '?X?V???t'
873 198 h-you
  , constraint constructiontypemaster_PKC primary key (TypeCode)
874 271 h-you
) comment '?H?????}?X?^' ;
875 84 h-you
876 271 h-you
-- ?S??????o??f?[?^
877 325 h-you
drop table if exists costdataofperson cascade;
878 84 h-you
879 198 h-you
create table costdataofperson (
880 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
881
  , ActionDate date not null comment '?????t'
882
  , DataType decimal(1,0) not null comment '?f?[?^??'
883
  , DataAddCount decimal(5,0) unsigned not null comment '?f?[?^??????'
884
  , TargetMonth varchar(7) not null comment '???N??'
885
  , ConstructionCode decimal(10,0) unsigned comment '?H???R?[?h'
886
  , SuppliersCode decimal(5,0) unsigned not null comment '?x????R?[?h'
887
  , SuppliersName varchar(120) comment '?x??????'
888
  , PaymentContent varchar(60) comment '?x?????e'
889
  , PaymentType decimal(1,0) not null comment '?x?????@?t???O'
890
  , EntryPrice decimal(12,0) not null comment '???z?i????j'
891
  , EntryPriceInTax decimal(12,0) not null comment '???z?i????j'
892
  , SlipNumber varchar(12) comment '?`?[???'
893
  , ComplateFlg decimal(1,0) not null comment '???????t???O'
894
  , ApprovalFlg decimal(1,0) not null comment '???F?t???O'
895
  , EntryDate datetime not null comment '?o?^???t'
896
  , UpdateDate datetime not null comment '?X?V???t'
897 198 h-you
  , constraint costdataofperson_PKC primary key (PersonCode,ActionDate,DataType,DataAddCount)
898 271 h-you
) comment '?S??????o??f?[?^' ;
899 84 h-you
900 198 h-you
create index CostDataOfPerson_Index1
901
  on costdataofperson(TargetMonth);
902 84 h-you
903 198 h-you
create index CostDataOfPerson_Index2
904
  on costdataofperson(ConstructionCode);
905 84 h-you
906 271 h-you
-- ??????o?^?\???f?[?^
907 325 h-you
drop table if exists costomerregist cascade;
908 84 h-you
909 198 h-you
create table costomerregist (
910 332 h-you
  CreatePersonCode decimal(8,0) unsigned not null comment '?\??????'
911 271 h-you
  , CreateDate date not null comment '????'
912
  , SeqNo decimal(2,0) not null comment '?L?[?A??'
913
  , DataMode decimal(1,0) not null comment '?f?[?^??'
914
  , SourceCotegory decimal(5,0) unsigned not null comment '???????'
915
  , SourceCode decimal(5,0) unsigned not null comment '??????R?[?h'
916
  , PetitionPeriod decimal(4,0) unsigned not null comment '?????'
917
  , OrderFlg decimal(1,0) not null comment '?@?l?c??E??l?t???O'
918
  , CorporateStatusName varchar(100) comment '?@?l?i????'
919
  , CorporateStatusPoint decimal(1,0) comment '?@?l?i?????u'
920
  , OrderersName1 varchar(60) not null comment '???????1'
921
  , OrderersName2 varchar(60) comment '????????Q'
922
  , DepartmentName varchar(60) comment '??????'
923 332 h-you
  , PersonName varchar(60) comment '?S?????'
924 271 h-you
  , ZipCode varchar(8) comment '?X????'
925
  , Address1 varchar(60) comment '?Z???P'
926
  , Address2 varchar(60) comment '?Z??2'
927
  , Address3 varchar(60) comment '?Z??3'
928
  , PhoneNumber varchar(13) comment '?d?b???'
929
  , FaxNumber varchar(13) comment 'FAX???'
930
  , MailAddress varchar(257) comment '???[???A?h???X'
931
  , Note varchar(300) comment '???l'
932
  , OrderCotegory decimal(5,0) unsigned not null comment '???????'
933
  , OrderDate date not null comment '?\????'
934
  , OrderNo decimal(2,0) unsigned not null comment '?\????t???'
935 332 h-you
  , CreateDepartmentCode decimal(5,0) unsigned not null comment '?\???????R?[?h'
936
  , CreateDepartmentName varchar(60) comment '?\????????'
937 271 h-you
  , EntryDate datetime not null comment '?o?^???t'
938
  , UpdateDate datetime not null comment '?X?V???t'
939 332 h-you
  , constraint costomerregist_PKC primary key (CreatePersonCode,CreateDate,SeqNo)
940 271 h-you
) comment '??????o?^?\???f?[?^' ;
941 84 h-you
942 198 h-you
create index CostomerRegist_Index1
943
  on costomerregist(PetitionPeriod);
944 84 h-you
945 332 h-you
create index CostomerRegist_Index2
946
  on costomerregist(CreatePersonCode);
947
948
create index CostomerRegist_Index3
949
  on costomerregist(CreateDepartmentCode);
950
951 271 h-you
-- ????f?[?^
952 325 h-you
drop table if exists dailydataconstruction cascade;
953 84 h-you
954 198 h-you
create table dailydataconstruction (
955 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
956
  , DailyDataDate date not null comment '???????'
957
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
958
  , Weather varchar(60) comment '?V?C'
959
  , EntryDate datetime not null comment '?o?^???t'
960
  , UpdateDate datetime not null comment '?X?V???t'
961 198 h-you
  , constraint dailydataconstruction_PKC primary key (PersonCode,DailyDataDate,ConstructionCode)
962 271 h-you
) comment '????f?[?^' ;
963 84 h-you
964 198 h-you
create index DailyDataConstruction_Index1
965
  on dailydataconstruction(PersonCode);
966 101 h-you
967 198 h-you
create index DailyDataConstruction_Index2
968
  on dailydataconstruction(DailyDataDate);
969 101 h-you
970 198 h-you
create index DailyDataConstruction_Index3
971
  on dailydataconstruction(ConstructionCode);
972 84 h-you
973 271 h-you
-- ????f?[?^ (????)
974 325 h-you
drop table if exists dailydatadetail cascade;
975 84 h-you
976 198 h-you
create table dailydatadetail (
977 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
978
  , DailyDataDate date not null comment '???????'
979
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
980
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
981
  , JobCategoryCode decimal(5,0) not null comment '?E??L?['
982
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
983
  , TodayHeadCount decimal(4,1) not null comment '?????l????'
984
  , TotalHeadCount decimal(5,1) not null comment '??v?l????'
985
  , TodayWork varchar(100) comment '?????????e'
986
  , NextdayWork varchar(100) comment '?????????e'
987
  , NextdayHeadCount decimal(4,1) not null comment '?????l????'
988
  , EntryDate datetime not null comment '?o?^???t'
989
  , UpdateDate datetime not null comment '?X?V???t'
990 198 h-you
  , constraint dailydatadetail_PKC primary key (PersonCode,DailyDataDate,ConstructionCode,SeqNo)
991 271 h-you
) comment '????f?[?^ (????)' ;
992 84 h-you
993 198 h-you
create index DailyDataDetail_Index
994
  on dailydatadetail(PersonCode,DailyDataDate,ConstructionCode);
995 84 h-you
996 271 h-you
-- ????f?[?^ (??????)
997 325 h-you
drop table if exists dailydatafield cascade;
998 84 h-you
999 198 h-you
create table dailydatafield (
1000 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
1001
  , DailyDataDate date not null comment '???????'
1002
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1003
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
1004
  , PatrolTime datetime not null comment '?????'
1005
  , ContentsText varchar(200) comment '???e'
1006
  , EntryDate datetime not null comment '?o?^???t'
1007
  , UpdateDate datetime not null comment '?X?V???t'
1008 198 h-you
  , constraint dailydatafield_PKC primary key (PersonCode,DailyDataDate,ConstructionCode,SeqNo)
1009 271 h-you
) comment '????f?[?^ (??????)' ;
1010 84 h-you
1011 198 h-you
create index DailyDataField_Index
1012
  on dailydatafield(PersonCode,DailyDataDate,ConstructionCode);
1013 84 h-you
1014 271 h-you
-- ????f?[?^ (????)
1015 325 h-you
drop table if exists dailydatamaterials cascade;
1016 84 h-you
1017 198 h-you
create table dailydatamaterials (
1018 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
1019
  , DailyDataDate date not null comment '???????'
1020
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1021
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
1022
  , Materials varchar(100) comment '?????'
1023
  , Quantity varchar(100) comment '????'
1024
  , Production varchar(100) comment '??????'
1025
  , Delivery varchar(100) comment '?[?????'
1026
  , QualityControl varchar(100) comment '?i?????????'
1027
  , EntryDate datetime not null comment '?o?^???t'
1028
  , UpdateDate datetime not null comment '?X?V???t'
1029 198 h-you
  , constraint dailydatamaterials_PKC primary key (PersonCode,DailyDataDate,ConstructionCode,SeqNo)
1030 271 h-you
) comment '????f?[?^ (????)' ;
1031 84 h-you
1032 198 h-you
create index DailyDataMaterials_Index
1033
  on dailydatamaterials(PersonCode,DailyDataDate,ConstructionCode);
1034 84 h-you
1035 271 h-you
-- ????f?[?^ (??????w??)
1036 325 h-you
drop table if exists dailydatasubcontractors cascade;
1037 84 h-you
1038 198 h-you
create table dailydatasubcontractors (
1039 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
1040
  , DailyDataDate date not null comment '???????'
1041
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1042
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
1043
  , Attendee varchar(100) comment '?o???'
1044
  , ContentsText varchar(200) comment '???e'
1045
  , EntryDate datetime not null comment '?o?^???t'
1046
  , UpdateDate datetime not null comment '?X?V???t'
1047 198 h-you
  , constraint dailydatasubcontractors_PKC primary key (PersonCode,DailyDataDate,ConstructionCode,SeqNo)
1048 271 h-you
) comment '????f?[?^ (??????w??)' ;
1049 84 h-you
1050 198 h-you
create index DailyDataSubcontractors_Index
1051
  on dailydatasubcontractors(PersonCode,DailyDataDate,ConstructionCode);
1052 84 h-you
1053 271 h-you
-- ????f?[?^ (???)
1054 325 h-you
drop table if exists dailydatavehicles cascade;
1055 84 h-you
1056 198 h-you
create table dailydatavehicles (
1057 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
1058
  , DailyDataDate date not null comment '???????'
1059
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1060
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
1061
  , Model varchar(100) comment '?@??'
1062
  , Performance varchar(100) comment '???\'
1063
  , Owner varchar(100) comment '???L???'
1064
  , Driver varchar(100) comment '?????^?]??'
1065
  , StartWorkingTime datetime not null comment '??????J?n'
1066
  , EndWorkingTime datetime not null comment '??????I??'
1067
  , EntryDate datetime not null comment '?o?^???t'
1068
  , UpdateDate datetime not null comment '?X?V???t'
1069 198 h-you
  , constraint dailydatavehicles_PKC primary key (PersonCode,DailyDataDate,ConstructionCode,SeqNo)
1070 271 h-you
) comment '????f?[?^ (???)' ;
1071 84 h-you

1072 198 h-you
create index DailyDataVehicles_Index
1073
  on dailydatavehicles(PersonCode,DailyDataDate,ConstructionCode);
1074 84 h-you

1075 271 h-you
-- ???}?X?^
1076 325 h-you
drop table if exists daymaster cascade;
1077 84 h-you

1078 198 h-you
create table daymaster (
1079 271 h-you
  days smallint(6) not null comment '??'
1080 338 h-you
  , constraint daymaster_PKC primary key (days)
1081 271 h-you
) comment '???}?X?^' ;
1082 84 h-you

1083 271 h-you
-- ?????}?X?^
1084 325 h-you
drop table if exists deadlinemaster cascade;
1085 106 bit

1086
create table deadlinemaster (
1087 271 h-you
  LABOURKIND decimal(1,0) default '0' not null comment '??????'
1088
  , DEADLINE decimal(2,0) comment '????'
1089
  , PAYDAY decimal(2,0) comment '?x????'
1090
  , NOTE varchar(120) comment '???l'
1091
  , DELETEFLG decimal(1,0) comment '???t???O'
1092
  , ENTRYDATE datetime comment '?o?^???t'
1093
  , UPDATEDATE datetime comment '?X?V???t'
1094 106 bit
  , constraint deadlinemaster_PKC primary key (LABOURKIND)
1095 271 h-you
) comment '?????}?X?^' ;
1096 106 bit

1097 271 h-you
-- ?????o???}?X?^
1098 325 h-you
drop table if exists departmentexpensesmaster cascade;
1099 198 h-you

1100
create table departmentexpensesmaster (
1101 271 h-you
  DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
1102
  , ExpensesPeriod smallint(6) not null comment '?????'
1103 342 h-you
  , NameCode decimal(5,0) unsigned not null comment '?o??R?[?h'
1104
  , NameString varchar(100) not null comment '????'
1105 271 h-you
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
1106
  , ExpensesRaito decimal(4,2) not null comment '?o??'
1107
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1108
  , EntryDate datetime not null comment '?o?^???t'
1109
  , UpdateDate datetime not null comment '?X?V???t'
1110 198 h-you
  , constraint departmentexpensesmaster_PKC primary key (DepartmentCode,ExpensesPeriod,NameCode)
1111 271 h-you
) comment '?????o???}?X?^' ;
1112 198 h-you

1113 271 h-you
-- ?????}?X?^
1114 325 h-you
drop table if exists departmentmaster cascade;
1115 198 h-you

1116
create table departmentmaster (
1117 271 h-you
  DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
1118
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
1119
  , DepartmentString varchar(100) not null comment '??????'
1120
  , ActionScheduleFlg decimal(1,0) not null comment '?s???\??\???t???O'
1121
  , StaffAssignFlg decimal(1,0) not null comment '?l???z?u?\???t???O'
1122 338 h-you
  , StartDate datetime not null comment '?J?n???t'
1123
  , CompDate datetime not null comment '?I?????t'
1124 271 h-you
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1125
  , EntryDate datetime not null comment '?o?^???t'
1126
  , UpdateDate datetime not null comment '?X?V???t'
1127 198 h-you
  , constraint departmentmaster_PKC primary key (DepartmentCode)
1128 271 h-you
) comment '?????}?X?^' ;
1129 198 h-you

1130
create index DepartmentMaster_index1
1131
  on departmentmaster(DisplayOrder);
1132

1133 271 h-you
-- ?????m?F???F?f?[?^
1134 325 h-you
drop table if exists depositapprovalinfo cascade;
1135 198 h-you

1136 106 bit
create table depositapprovalinfo (
1137 271 h-you
  ORDERERSDIVISION decimal(5,0) not null comment '???????'
1138
  , ORDERERSCODE decimal(5,0) not null comment '??????R?[?h'
1139
  , TARGETDATE decimal(6,0) not null comment '???N??'
1140
  , SEQNO decimal(3,0) not null comment '?A??'
1141
  , LINECOUNT decimal(3,0) not null comment '?s???'
1142
  , APPROVALNO decimal(3,0) not null comment '???F????'
1143
  , APPROVALPERSON decimal(8,0) comment '???F??R?[?h'
1144
  , APPROVALPERSONNAME varchar(20) comment '???F???'
1145
  , APPROVALAUTHORITY decimal(1,0) comment '???F??????'
1146
  , APPROVALDATE date comment '???F???t'
1147
  , ENTRYDATE datetime comment '?o?^???t'
1148
  , UPDATEDATE datetime comment '?X?V???t'
1149 106 bit
  , constraint depositapprovalinfo_PKC primary key (ORDERERSDIVISION,ORDERERSCODE,TARGETDATE,SEQNO,LINECOUNT,APPROVALNO)
1150 271 h-you
) comment '?????m?F???F?f?[?^' ;
1151 106 bit

1152 271 h-you
-- ?????f?[?^
1153 325 h-you
drop table if exists depositdata cascade;
1154 106 bit

1155
create table depositdata (
1156 271 h-you
  ORDERERSDIVISION decimal(5,0) not null comment '???????'
1157
  , ORDERERSCODE decimal(5,0) not null comment '??????R?[?h'
1158
  , TARGETDATE decimal(6,0) not null comment '???N??'
1159
  , SEQNO decimal(3,0) not null comment '?A??'
1160
  , BUSINESSPERIOD decimal(4,0) comment '?c???'
1161
  , DEPOSITDATE date comment '??????'
1162
  , DEPOSITAMOUNT decimal(12,0) comment '???????z'
1163
  , DEPOSITAMOUNTCASH decimal(10,0) comment '???????z?i?????j'
1164
  , DEPOSITAMOUNTBILL decimal(10,0) comment '???????z?i??`?j'
1165
  , DEPOSITPERSONCODE decimal(8,0) not null comment '?????S????R?[?h'
1166
  , NOTE varchar(120) comment '???l'
1167
  , ENTRYDATE datetime comment '?o?^???t'
1168
  , UPDATEDATE datetime comment '?X?V???t'
1169 106 bit
  , constraint depositdata_PKC primary key (ORDERERSDIVISION,ORDERERSCODE,TARGETDATE,SEQNO)
1170 271 h-you
) comment '?????f?[?^' ;
1171 106 bit

1172 271 h-you
-- ????????f?[?^
1173 325 h-you
drop table if exists depositdatadetail cascade;
1174 106 bit

1175
create table depositdatadetail (
1176 271 h-you
  ORDERERSDIVISION decimal(5,0) not null comment '???????'
1177
  , ORDERERSCODE decimal(5,0) not null comment '??????R?[?h'
1178
  , TARGETDATE decimal(6,0) not null comment '???N??'
1179
  , REQUESTNO decimal(10,0) not null comment '????No'
1180
  , ORDERNO decimal(2,0) comment '??t???'
1181
  , DEPOSITAMOUNT decimal(10,0) comment '???????z'
1182
  , DISCOUNTAMOUNT decimal(10,0) comment '?l???????z'
1183
  , CNSTRPRICE decimal(10,0) comment '?????'
1184
  , FEES decimal(10,0) comment '????'
1185
  , OTHERADJUSTMENTS decimal(10,0) comment '?????'
1186
  , DIFFERENCEAMOUNT decimal(10,0) comment '????'
1187
  , CONFIRMATIONPERSONCODE decimal(8,0) comment '?m?F?S????R?[?h'
1188
  , CONFIRMATIONDATE date comment '?S????m?F???t'
1189
  , CONFIRMATIONENDFLG decimal(1,0) comment '?m?F?????t???O'
1190
  , NOTE varchar(120) comment '???l'
1191
  , ENTRYDATE datetime comment '?o?^???t'
1192
  , UPDATEDATE datetime comment '?X?V???t'
1193 184 bit
  , constraint depositdatadetail_PKC primary key (ORDERERSDIVISION,ORDERERSCODE,TARGETDATE,REQUESTNO)
1194 271 h-you
) comment '????????f?[?^' ;
1195 106 bit

1196 271 h-you
-- ???}?X?^
1197 325 h-you
drop table if exists divisionmaster cascade;
1198 198 h-you

1199
create table divisionmaster (
1200 271 h-you
  DivisionCode decimal(5,0) unsigned not null comment '???R?[?h'
1201
  , NameCode decimal(5,0) unsigned not null comment '????R?[?h'
1202
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
1203
  , NameString varchar(100) not null comment '????'
1204
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1205
  , EntryDate datetime not null comment '?o?^???t'
1206
  , UpdateDate datetime not null comment '?X?V???t'
1207 198 h-you
  , constraint divisionmaster_PKC primary key (DivisionCode,NameCode)
1208 271 h-you
) comment '???}?X?^' ;
1209 198 h-you

1210 271 h-you
-- ??Z?\?Z???f?[?^
1211 325 h-you
drop table if exists estimatebudget cascade;
1212 198 h-you

1213
create table estimatebudget (
1214 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1215
  , ConstructionTime decimal(5,2) unsigned not null comment '?H??'
1216
  , IntegratedCode decimal(8,0) not null comment '??Z??'
1217
  , DataCreateDate datetime not null comment '?f?[?^??????'
1218
  , RetValue1 decimal(12,0) not null comment '?\???i'
1219
  , RetValue2 decimal(12,0) not null comment '????H????'
1220
  , RetValue3 decimal(12,0) not null comment '????????????'
1221
  , RetValue4 decimal(12,0) not null comment '????????????'
1222
  , RetPercent decimal(5,2) not null comment '???????'
1223
  , EntryDate datetime not null comment '?o?^???t'
1224
  , UpdateDate datetime not null comment '?X?V???t'
1225 198 h-you
  , constraint estimatebudget_PKC primary key (ConstructionCode)
1226 271 h-you
) comment '??Z?\?Z???f?[?^' ;
1227 198 h-you

1228 271 h-you
-- ??Z?\?Z????f?[?^????
1229 325 h-you
drop table if exists estimatebudgetdetail cascade;
1230 198 h-you

1231
create table estimatebudgetdetail (
1232 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1233
  , GroupCount decimal(2,0) unsigned not null comment '?O???[?v???'
1234
  , LineCount decimal(3,0) unsigned not null comment '?s???'
1235
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
1236
  , ItemCode decimal(5,0) unsigned comment '?H??L?['
1237
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
1238
  , FirstString varchar(120) comment '???????'
1239
  , SecondString varchar(120) comment '?H????E???????'
1240
  , Content varchar(120) comment '???e'
1241
  , EstimatePrice decimal(12,0) not null comment '????????z'
1242
  , NegotiationPrice decimal(12,0) not null comment '????????z'
1243
  , Notes varchar(120) comment '???????'
1244
  , EntryDate datetime not null comment '?o?^???t'
1245
  , UpdateDate datetime not null comment '?X?V???t'
1246 198 h-you
  , constraint estimatebudgetdetail_PKC primary key (ConstructionCode,GroupCount,LineCount)
1247 271 h-you
) comment '??Z?\?Z????f?[?^????' ;
1248 198 h-you

1249 271 h-you
-- ??Z????f?[?^
1250 325 h-you
drop table if exists estimatedata cascade;
1251 198 h-you

1252
create table estimatedata (
1253 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1254
  , LineCount decimal(3,0) unsigned not null comment '?s???'
1255
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
1256
  , FixedItemCode varchar(1) comment '?????L?['
1257
  , ItemName varchar(120) comment '??????'
1258
  , SpecName varchar(120) comment '???^?i???E?`??E???@'
1259
  , PriceValue decimal(14,0) not null comment '???z'
1260
  , note varchar(60) comment '???l'
1261
  , MyExpensesFlg decimal(1,0) not null comment '????o??t???O'
1262
  , InputFlg decimal(1,0) not null comment '????t???O'
1263
  , EntryDate datetime not null comment '?o?^???t'
1264
  , UpdateDate datetime not null comment '?X?V???t'
1265 198 h-you
  , constraint estimatedata_PKC primary key (ConstructionCode,LineCount)
1266 271 h-you
) comment '??Z????f?[?^' ;
1267 198 h-you

1268
create index EstimateData_Index1
1269
  on estimatedata(ConstructionCode,FixedItemCode);
1270

1271 271 h-you
-- ??Z????y?[?W?f?[?^
1272 325 h-you
drop table if exists estimatedatabody cascade;
1273 198 h-you

1274
create table estimatedatabody (
1275 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1276
  , PageCount decimal(4,0) unsigned not null comment '?y?[?W???'
1277
  , Category decimal(1,0) not null comment '?y?[?W??'
1278
  , UnionComponentCode decimal(5,0) unsigned not null comment '?????\???L?['
1279
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
1280
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
1281
  , SelectComponent decimal(5,0) unsigned not null comment '?I???\???L?['
1282
  , PageTitle varchar(120) not null comment '?y?[?W?\????'
1283
  , DetailLineCount decimal(3,0) unsigned not null comment '????s???'
1284
  , EntryDate datetime not null comment '?o?^???t'
1285
  , UpdateDate datetime not null comment '?X?V???t'
1286 198 h-you
  , constraint estimatedatabody_PKC primary key (ConstructionCode,PageCount)
1287 271 h-you
) comment '??Z????y?[?W?f?[?^' ;
1288 198 h-you

1289
create index EstimateDataBody_Index1
1290
  on estimatedatabody(ConstructionCode,ComponentCode,ItemCode);
1291

1292 271 h-you
-- ??Z????f?[?^????
1293 325 h-you
drop table if exists estimatedatadetail cascade;
1294 198 h-you

1295
create table estimatedatadetail (
1296 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1297
  , PageCount decimal(4,0) unsigned not null comment '?y?[?W???'
1298
  , LineCount decimal(3,0) unsigned not null comment '?s???'
1299
  , DataType decimal(1,0) not null comment '?f?[?^???'
1300
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
1301
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
1302
  , SpecCode decimal(5,0) unsigned not null comment '???L?['
1303
  , ItemName varchar(120) comment '??????'
1304
  , SpecName varchar(120) comment '???^?i???E?`??E???@'
1305
  , Unitcount decimal(8,2) not null comment '????'
1306
  , UnitName varchar(30) comment '?P?????'
1307
  , UnitPrice decimal(9,2) not null comment '?P??'
1308
  , LineTotal decimal(12,0) not null comment '???z'
1309
  , note varchar(60) comment '???l'
1310
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
1311
  , MyExpensesFlg decimal(1,0) not null comment '????o??t???O'
1312
  , InputFlg decimal(1,0) comment '????t???O'
1313
  , EntryDate datetime not null comment '?o?^???t'
1314
  , UpdateDate datetime not null comment '?X?V???t'
1315 198 h-you
  , constraint estimatedatadetail_PKC primary key (ConstructionCode,PageCount,LineCount)
1316 271 h-you
) comment '??Z????f?[?^????' ;
1317 198 h-you

1318
create index EstimateDataDetail_Index1
1319
  on estimatedatadetail(ConstructionCode,PageCount);
1320

1321 271 h-you
-- ?o???}?X?^
1322 325 h-you
drop table if exists expensesmaster cascade;
1323 198 h-you

1324
create table expensesmaster (
1325 271 h-you
  DivisionCode smallint(6) not null comment '?H?????R?[?h'
1326
  , NameCode smallint(6) not null comment '?o????R?[?h'
1327
  , DisplayOrder smallint(6) not null comment '?\????'
1328
  , ExpensesRatio decimal(4,2) not null comment '?o??'
1329
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1330
  , EntryDate datetime not null comment '?o?^???t'
1331
  , UpdateDate datetime not null comment '?X?V???t'
1332 198 h-you
  , constraint expensesmaster_PKC primary key (DivisionCode,NameCode)
1333 271 h-you
) comment '?o???}?X?^' ;
1334 198 h-you

1335 271 h-you
-- ???x???}?X?^
1336 325 h-you
drop table if exists holidaycalendermaster cascade;
1337 198 h-you

1338
create table holidaycalendermaster (
1339 271 h-you
  Holiday date not null comment '?x??'
1340
  , BusinessYear smallint(5) unsigned not null comment '?c??N?x'
1341
  , TargetMonth tinyint(3) unsigned not null comment '?Y????'
1342
  , TargetDay tinyint(3) unsigned not null comment '?Y????'
1343 198 h-you
  , constraint holidaycalendermaster_PKC primary key (Holiday)
1344 271 h-you
) comment '???x???}?X?^' ;
1345 198 h-you

1346
create index HolidayCalender_Index1
1347
  on holidaycalendermaster(BusinessYear);
1348

1349
create index HolidayCalenderMaster_Index2
1350
  on holidaycalendermaster(TargetMonth);
1351

1352
create index HolidayCalenderMaster_Index3
1353
  on holidaycalendermaster(TargetDay);
1354

1355 271 h-you
-- ?????????????
1356 325 h-you
drop table if exists inputsearchlogdata cascade;
1357 198 h-you

1358
create table inputsearchlogdata (
1359 271 h-you
  ConstructionCode decimal(10,0) not null comment '?H???R?[?h'
1360
  , UsedProcessNo decimal(4,0) not null comment '?g?p?@?\???'
1361
  , DisplayOrder decimal(4,0) unsigned not null comment '?\????'
1362
  , DataType decimal(1,0) not null comment '?f?[?^???'
1363
  , InputCode decimal(10,0) comment '????R?[?h'
1364 198 h-you
  , constraint inputsearchlogdata_PKC primary key (ConstructionCode,UsedProcessNo,DisplayOrder)
1365 271 h-you
) comment '?????????????' ;
1366 198 h-you

1367
create index InputSearchLogData_Index1
1368
  on inputsearchlogdata(ConstructionCode,UsedProcessNo,InputCode);
1369

1370 271 h-you
-- ???????f?[?^
1371 325 h-you
drop table if exists invoicedata cascade;
1372 106 bit

1373
create table invoicedata (
1374 271 h-you
  INVOICENO decimal(9,0) not null comment '??????No'
1375
  , ORDERERSDIVISION decimal(5,0) not null comment '???????'
1376
  , ORDERERSCODE decimal(5,0) not null comment '??????R?[?h'
1377
  , REQUESTMONTH decimal(6,0) not null comment '??????'
1378
  , SEQNO decimal(2,0) not null comment '?A??'
1379
  , CRETATEDATE date not null comment '????'
1380
  , REQUESTDATE date not null comment '??????'
1381
  , REQUESTNAME varchar(120) comment '??????'
1382
  , TOTALAMOUNT decimal(10,0) comment '???????v???z'
1383
  , TAXAMOUNT decimal(10,0) comment '???????z'
1384
  , COMMENT1 varchar(60) comment '?R?????g1'
1385
  , COMMENT2 varchar(60) comment '?R?????g2'
1386
  , COMMENT3 varchar(60) not null comment '?R?????g3'
1387
  , COMMENT4 varchar(60) not null comment '?R?????g4'
1388
  , COMMENT5 varchar(60) not null comment '?R?????g5'
1389
  , COMPLETEFLG decimal(1,0) default '0' not null comment '?????t???O'
1390
  , ENTRYDATE datetime not null comment '?o?^?N????'
1391
  , UPDATEDATE datetime not null comment '?X?V?N????'
1392 106 bit
  , constraint invoicedata_PKC primary key (INVOICENO)
1393 271 h-you
) comment '???????f?[?^' ;
1394 106 bit

1395
alter table invoicedata add unique ORDERERSDIVISION (ORDERERSDIVISION,ORDERERSCODE,REQUESTMONTH,SEQNO) ;
1396

1397 271 h-you
-- ??????
1398 325 h-you
drop table if exists materialinfo cascade;
1399 106 bit

1400
create table materialinfo (
1401 271 h-you
  MATERIALITEMCODE smallint(5) unsigned default 0 not null comment '????i??R?[?h'
1402
  , MATERIALCOUNT smallint(5) unsigned comment '?????'
1403
  , RENTCOUNT smallint(5) unsigned comment '??o??\??'
1404
  , DELETEFLG smallint(5) unsigned comment '???t???O'
1405
  , ENTRYDATE datetime comment '?o?^???t'
1406
  , UPDATEDATE datetime comment '?X?V???t'
1407 106 bit
  , constraint materialinfo_PKC primary key (MATERIALITEMCODE)
1408 271 h-you
) comment '??????' ;
1409 106 bit

1410 271 h-you
-- ????i??}?X?^
1411 325 h-you
drop table if exists materialitemmaster cascade;
1412 106 bit

1413
create table materialitemmaster (
1414 271 h-you
  MATERIALITEMCODE smallint(5) unsigned default 0 not null comment '????i??R?[?h'
1415
  , MATERIALKINDCODE smallint(5) unsigned comment '??????R?[?h'
1416
  , MATERIALITEMNAME varchar(40) comment '????i?????'
1417
  , DISPLAYORDER smallint(5) unsigned comment '?\????'
1418
  , DELETEFLG tinyint(3) unsigned comment '???t???O'
1419
  , ENTRYDATE datetime comment '?o?^???t'
1420
  , UPDATEDATE datetime comment '?X?V???t'
1421
  , VERSIONNO decimal(8,0) default '0' not null comment '?o?[?W???????'
1422 106 bit
  , constraint materialitemmaster_PKC primary key (MATERIALITEMCODE)
1423 271 h-you
) comment '????i??}?X?^' ;
1424 106 bit

1425 271 h-you
-- ??????}?X?^
1426 325 h-you
drop table if exists materialkindmaster cascade;
1427 106 bit

1428
create table materialkindmaster (
1429 271 h-you
  MATERIALKINDCODE smallint(5) unsigned default 0 not null comment '??????R?[?h'
1430
  , MATERIALKINDNAME varchar(40) comment '?????????'
1431
  , DISPLAYORDER smallint(5) unsigned comment '?\????'
1432
  , DELETEFLG tinyint(3) unsigned comment '???t???O'
1433
  , ENTRYDATE datetime comment '?o?^???t'
1434
  , UPDATEDATE datetime comment '?X?V???t'
1435 106 bit
  , constraint materialkindmaster_PKC primary key (MATERIALKINDCODE)
1436 271 h-you
) comment '??????}?X?^' ;
1437 106 bit

1438 271 h-you
-- ??????????
1439 325 h-you
drop table if exists materialrecordinfo cascade;
1440 106 bit

1441
create table materialrecordinfo (
1442 271 h-you
  MATERIALITEMCODE smallint(5) unsigned default 0 not null comment '????i??R?[?h'
1443
  , PROCESSDATE date default '0000-00-00' not null comment '?????N????'
1444
  , SEQNO smallint(5) unsigned default 0 not null comment '?A??'
1445
  , RECKIND tinyint(3) unsigned comment '???R?[?h??'
1446
  , CONSTRUCTIONCODE int(10) unsigned comment '?H?????'
1447
  , PERSONCODE int(10) unsigned comment '?S????R?[?h'
1448
  , MATERIALCOUNT smallint(5) unsigned comment '?????'
1449
  , REPAYPLANDATE date comment '??p?\??N????'
1450
  , COMMENTTEXT varchar(80) comment '?R?????g'
1451
  , ENTRYDATE datetime comment '?o?^???t'
1452
  , UPDATEDATE datetime comment '?X?V???t'
1453 106 bit
  , constraint materialrecordinfo_PKC primary key (MATERIALITEMCODE,PROCESSDATE,SEQNO)
1454 271 h-you
) comment '??????????' ;
1455 106 bit

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

1459
create table messageboarddata (
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
  , FromCode decimal(8,0) unsigned not null comment '???????R?[?h'
1463
  , FromName varchar(60) not null comment '???????'
1464
  , MessageTitile varchar(100) comment '?`???^?C?g??'
1465
  , MessageContent varchar(1333) not null comment '?`?????e'
1466
  , LinkType decimal(2,0) not null comment '?????N????^?C?v'
1467
  , LinkMessage varchar(200) comment '?????N??????'
1468
  , LinkCode varchar(30) comment '?????N?L?['
1469
  , WritingDate datetime not null comment '?????????'
1470
  , PersonCode decimal(8,0) not null comment '??????S????R?[?h'
1471
  , ShareFlag decimal(2,0) not null comment '???????t???O'
1472
  , MessageColor varchar(8) comment '?????F'
1473
  , BackColor varchar(8) comment '?o?b?N?J???['
1474
  , MessageFlag decimal(1,0) not null comment '???b?Z?[?W?t???O'
1475
  , EntryDate datetime not null comment '?o?^???t'
1476
  , UpdateDate datetime not null comment '?X?V???t'
1477 198 h-you
  , constraint messageboarddata_PKC primary key (RecordNumber,BranchNumber)
1478 271 h-you
) comment '?f??????b?Z?[?W' ;
1479 198 h-you

1480
create index MessageBoardData_Index1
1481
  on messageboarddata(WritingDate);
1482

1483
create index MessageBoardData_Index2
1484
  on messageboarddata(MessageFlag);
1485

1486 271 h-you
-- ?f???????e?[?u??
1487 325 h-you
drop table if exists messageboardterget cascade;
1488 198 h-you

1489
create table messageboardterget (
1490 271 h-you
  RecordNumber decimal(6,0) unsigned not null comment '???R?[?h???'
1491
  , BranchNumber decimal(3,0) unsigned not null comment '???R?[?h?}??'
1492
  , SeqNum decimal(3,0) unsigned not null comment '????'
1493
  , ToCode decimal(8,0) not null comment '????R?[?h'
1494
  , ToName varchar(60) not null comment '????'
1495
  , EntryDate datetime not null comment '?o?^???t'
1496
  , UpdateDate datetime not null comment '?X?V???t'
1497 198 h-you
  , constraint messageboardterget_PKC primary key (RecordNumber,BranchNumber,SeqNum)
1498 271 h-you
) comment '?f???????e?[?u??' ;
1499 198 h-you

1500
create index MessageBoardTerget_Index1
1501
  on messageboardterget(RecordNumber,BranchNumber);
1502

1503 271 h-you
-- ?f??????b?Z?[?W?{??????
1504 325 h-you
drop table if exists messagebrowsinghistory cascade;
1505 198 h-you

1506
create table messagebrowsinghistory (
1507 271 h-you
  RecordNumber decimal(6,0) unsigned not null comment '???R?[?h???'
1508
  , BranchNumber decimal(3,0) unsigned not null comment '???R?[?h?}??'
1509
  , SeqNum decimal(3,0) unsigned not null comment '????'
1510
  , BrowsingCode decimal(8,0) not null comment '?{????R?[?h'
1511
  , BrowsingDate datetime not null comment '?{?????t'
1512
  , EntryDate datetime not null comment '?o?^???t'
1513
  , UpdateDate datetime not null comment '?X?V???t'
1514 198 h-you
  , constraint messagebrowsinghistory_PKC primary key (RecordNumber,BranchNumber,SeqNum)
1515 271 h-you
) comment '?f??????b?Z?[?W?{??????' ;
1516 198 h-you

1517 271 h-you
-- ???}?X?^
1518 325 h-you
drop table if exists monthmaster cascade;
1519 198 h-you

1520
create table monthmaster (
1521 271 h-you
  month smallint(6) not null comment '??'
1522 338 h-you
  , constraint monthmaster_PKC primary key (month)
1523 271 h-you
) comment '???}?X?^' ;
1524 198 h-you

1525 271 h-you
-- ??????}?X?^
1526 325 h-you
drop table if exists orderersmaster cascade;
1527 198 h-you

1528
create table orderersmaster (
1529 271 h-you
  OrderCotegory decimal(5,0) unsigned not null comment '???????'
1530
  , OrderersCode decimal(5,0) unsigned not null comment '??????R?[?h'
1531
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
1532
  , OrderFlg decimal(1,0) not null comment '?@?l?c??E??l?t???O'
1533
  , CorporateStatusName varchar(100) comment '?@?l?i????'
1534
  , CorporateStatusPoint decimal(1,0) comment '?@?l?i?????u'
1535
  , OrderersName1 varchar(60) not null comment '???????1'
1536
  , OrderersName2 varchar(60) comment '????????Q'
1537
  , DepartmentName varchar(60) comment '??????'
1538
  , ChargePersonName varchar(60) comment '?S?????'
1539
  , ZipCode varchar(8) comment '?X????'
1540
  , Address1 varchar(60) comment '?Z???P'
1541
  , Address2 varchar(60) comment '?Z??2'
1542
  , Address3 varchar(60) comment '?Z??3'
1543
  , PhoneNumber varchar(13) comment '?d?b???'
1544
  , FaxNumber varchar(13) comment 'FAX???'
1545
  , MailAddress varchar(257) comment '???[???A?h???X'
1546
  , Note varchar(300) comment '???l'
1547
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1548
  , EntryDate datetime not null comment '?o?^???t'
1549
  , UpdateDate datetime not null comment '?X?V???t'
1550 198 h-you
  , constraint orderersmaster_PKC primary key (OrderCotegory,OrderersCode)
1551 271 h-you
) comment '??????}?X?^' ;
1552 198 h-you

1553 271 h-you
-- ????z?f?[?^
1554 325 h-you
drop table if exists orderspricedata cascade;
1555 198 h-you

1556
create table orderspricedata (
1557 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1558
  , ChangeNo decimal(3,0) unsigned not null comment '??X???'
1559
  , ChangeDate date not null comment '??X??'
1560
  , ChangePersonCode decimal(8,0) unsigned not null comment '??X??R?[?h'
1561
  , ChangePersonName varchar(60) comment '??X???'
1562
  , BeforeValue decimal(14,0) not null comment '??X?O???????z'
1563
  , BeforeValueInTax decimal(14,0) not null comment '??X?O???????z'
1564
  , AfterValue decimal(14,0) not null comment '??X????????z'
1565
  , AfterValueInTax decimal(14,0) not null comment '??X????????z'
1566
  , ChangeComment varchar(200) comment '??X???R'
1567
  , EntryDate datetime not null comment '?o?^???t'
1568
  , UpdateDate datetime not null comment '?X?V???t'
1569 198 h-you
  , constraint orderspricedata_PKC primary key (ConstructionCode,ChangeNo)
1570 271 h-you
) comment '????z?f?[?^' ;
1571 198 h-you

1572 271 h-you
-- ?x?????F???f?[?^
1573 325 h-you
drop table if exists paymentapprovalinfo cascade;
1574 106 bit

1575
create table paymentapprovalinfo (
1576 271 h-you
  COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h'
1577
  , TARGETDATE decimal(6,0) default '0' not null comment '???N??'
1578
  , SEQNO decimal(3,0) default '0' not null comment '?A??'
1579
  , LINECOUNT decimal(3,0) default '0' not null comment '?s???'
1580
  , APPROVALNO decimal(3,0) default '0' not null comment '???F????'
1581
  , APPROVALPERSON decimal(8,0) comment '???F??R?[?h'
1582
  , APPROVALPERSONNAME varchar(20) comment '???F???'
1583
  , APPROVALAUTHORITY decimal(1,0) comment '???F??????'
1584
  , APPROVALDATE date comment '???F???t'
1585
  , ENTRYDATE datetime comment '?o?^???t'
1586
  , UPDATEDATE datetime comment '?X?V???t'
1587 106 bit
  , constraint paymentapprovalinfo_PKC primary key (COMPANYCODE,TARGETDATE,SEQNO,LINECOUNT,APPROVALNO)
1588 271 h-you
) comment '?x?????F???f?[?^' ;
1589 106 bit

1590 271 h-you
-- ?x??????f?[?^
1591 325 h-you
drop table if exists paymentdatadetail cascade;
1592 106 bit

1593
create table paymentdatadetail (
1594 271 h-you
  COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h'
1595
  , TARGETDATE decimal(6,0) default '0' not null comment '???N??'
1596
  , SEQNO decimal(3,0) default '0' not null comment '?A??'
1597
  , LINECOUNT decimal(3,0) default '0' not null comment '?s???'
1598
  , BILLPRICE decimal(10,0) comment '???????z'
1599
  , DISCOUNTPRICE decimal(10,0) comment '?l???????z'
1600
  , OFFSETPRICE decimal(10,0) comment '???E???z'
1601
  , NEXTCOPRICE decimal(10,0) comment '????J?z'
1602
  , HIGHWPRICE decimal(10,0) comment '??????'
1603
  , HARDWPRICE decimal(10,0) comment '??????'
1604
  , INDSWASTETAX decimal(10,0) comment '?Y?p??'
1605
  , CNSTRPRICE decimal(10,0) comment '?????'
1606
  , CNSTRPRICEEXIST decimal(1,0) comment '??????L??'
1607
  , APPROVALPERSONCODE decimal(8,0) comment '???F?S????R?[?h'
1608
  , APPROVALDATE date comment '?S??????F???t'
1609
  , APPROVALENDFLG decimal(1,0) comment '???F?????t???O'
1610
  , ENTRYDATE datetime comment '?o?^???t'
1611
  , UPDATEDATE datetime comment '?X?V???t'
1612 106 bit
  , constraint paymentdatadetail_PKC primary key (COMPANYCODE,TARGETDATE,SEQNO,LINECOUNT)
1613 271 h-you
) comment '?x??????f?[?^' ;
1614 106 bit

1615 322 h-you
create index PayDataDetail_Index1
1616
  on paymentdatadetail(TARGETDATE);
1617

1618
create index PayDataDetail_Index2
1619
  on paymentdatadetail(APPROVALPERSONCODE);
1620

1621 302 h-you
-- ?H??????????f?[?^
1622 325 h-you
drop table if exists periodavoidance cascade;
1623 302 h-you

1624
create table periodavoidance (
1625
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1626
  , ConstructionStatusFlg decimal(2,0) not null comment '?H?????t???O'
1627
  , FieldNo decimal(2,0) not null comment '?`?F?b?N???t?B?[???h???'
1628
  , EntryDate datetime not null comment '?o?^???t'
1629
  , UpdateDate datetime not null comment '?X?V???t'
1630
  , constraint periodavoidance_PKC primary key (ConstructionCode,ConstructionStatusFlg,FieldNo)
1631
) comment '?H??????????f?[?^' ;
1632

1633
create index PeriodAvoidance_Index1
1634
  on periodavoidance(ConstructionCode);
1635

1636
create index PeriodAvoidance_Index2
1637
  on periodavoidance(ConstructionStatusFlg);
1638

1639
create index PeriodAvoidance_Index3
1640
  on periodavoidance(FieldNo);
1641

1642 271 h-you
-- ?S??????F?f?[?^
1643 325 h-you
drop table if exists personapproval cascade;
1644 198 h-you

1645
create table personapproval (
1646 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
1647
  , ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???'
1648
  , OrderDate date not null comment '??t??'
1649
  , OrderNo decimal(2,0) unsigned not null comment '??t???'
1650
  , SeqNo decimal(2,0) not null comment '?}??'
1651
  , PersonCodeApproval decimal(8,0) unsigned not null comment '?\???E???F??R?[?h'
1652
  , PetitionApprovalDate datetime not null comment '?\???E???F???t'
1653
  , ApprovalLimitDates datetime not null comment '???F??]??'
1654
  , ApprovalStatus decimal(1,0) not null comment '???F???'
1655
  , InputComment varchar(300) comment '?R?????g'
1656
  , EntryDate datetime not null comment '?o?^???t'
1657
  , UpdateDate datetime not null comment '?X?V???t'
1658 198 h-you
  , constraint personapproval_PKC primary key (PersonCode,ApprovalCode,OrderDate,OrderNo,SeqNo)
1659 271 h-you
) comment '?S??????F?f?[?^' ;
1660 198 h-you

1661 271 h-you
-- ?S??????F?R?????g?f?[?^
1662 325 h-you
drop table if exists personapprovalcomment cascade;
1663 198 h-you

1664
create table personapprovalcomment (
1665 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
1666
  , ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???'
1667
  , OrderDate date not null comment '??t??'
1668
  , OrderNo decimal(2,0) unsigned not null comment '??t???'
1669
  , CommentNo decimal(2,0) not null comment '?R?????g???'
1670
  , ParentNo decimal(2,0) not null comment '?e?R?????g???'
1671
  , ApproValComment varchar(300) comment '?w???E?A???R?????g'
1672
  , EntryDate datetime not null comment '?o?^???t'
1673
  , UpdateDate datetime not null comment '?X?V???t'
1674 198 h-you
  , constraint personapprovalcomment_PKC primary key (PersonCode,ApprovalCode,OrderDate,OrderNo,CommentNo)
1675 271 h-you
) comment '?S??????F?R?????g?f?[?^' ;
1676 198 h-you

1677 271 h-you
-- ?S??????????}?X?^
1678 325 h-you
drop table if exists persondepartmentmaster cascade;
1679 198 h-you

1680
create table persondepartmentmaster (
1681 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
1682
  , DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
1683
  , AffiliationFlg decimal(1,0) not null comment '?????t???O'
1684
  , EntryDate datetime not null comment '?o?^???t'
1685
  , UpdateDate datetime not null comment '?X?V???t'
1686 198 h-you
  , constraint persondepartmentmaster_PKC primary key (PersonCode,DepartmentCode)
1687 271 h-you
) comment '?S??????????}?X?^' ;
1688 198 h-you

1689
create index PersonDepartmentMaster_Index1
1690
  on persondepartmentmaster(PersonCode);
1691

1692
create index PersonDepartmentMaster_Index2
1693
  on persondepartmentmaster(DepartmentCode);
1694

1695 271 h-you
-- ?S????}?X?^
1696 325 h-you
drop table if exists personinchargemaster cascade;
1697 198 h-you

1698
create table personinchargemaster (
1699 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
1700
  , DisplayOrder decimal(8,0) unsigned not null comment '?\????'
1701
  , PersonName varchar(60) not null comment '?S?????'
1702
  , StartDate date not null comment '?g?p?J?n?N????'
1703
  , EndDate date comment '?g?p?I???N????'
1704
  , PassWord varchar(16) comment '?p?X???[?h'
1705
  , SecurityManagement decimal(1,0) not null comment '?@????'
1706
  , SecCode decimal(2,0) unsigned not null comment '???????'
1707
  , MsgBackColor varchar(8) comment '???b?Z?[?W?w?i?F'
1708
  , DisplayString varchar(20) comment '?\???E???????'
1709
  , DepartmentCode decimal(5,0) unsigned comment '?????R?[?h'
1710
  , MonthlySalary decimal(11,0) not null comment '???????z'
1711
  , YearSalary decimal(12,0) not null comment '?N????z'
1712
  , Qualification varchar(120) comment '???i?????'
1713
  , SealPrintName varchar(5) comment '???\????'
1714
  , EmployeeClassFlg decimal(1,0) not null comment '?????'
1715
  , LedgerFlg decimal(1,0) not null comment '???v?Z???t???O'
1716
  , CommutingDistance decimal(5,2) not null comment '??????'
1717
  , CommuteCosts decimal(5,0) not null comment '??????'
1718
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1719
  , EntryDate datetime not null comment '?o?^???t'
1720
  , UpdateDate datetime not null comment '?X?V???t'
1721 198 h-you
  , constraint personinchargemaster_PKC primary key (PersonCode)
1722 271 h-you
) comment '?S????}?X?^' ;
1723 198 h-you

1724
create index PersonInChargeMaster_Index1
1725
  on personinchargemaster(StartDate);
1726

1727
create index PersonInChargeMaster_Index2
1728
  on personinchargemaster(DepartmentCode);
1729

1730 271 h-you
-- ?S??????^?}?X?^
1731 325 h-you
drop table if exists personsalarymaster cascade;
1732 198 h-you

1733
create table personsalarymaster (
1734 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
1735
  , StartDate date not null comment '?g?p?J?n?N????'
1736
  , MonthlySalary decimal(11,0) not null comment '???????z'
1737
  , YearSalary decimal(12,0) not null comment '?N????z'
1738
  , EntryDate datetime not null comment '?o?^???t'
1739
  , UpdateDate datetime not null comment '?X?V???t'
1740 198 h-you
  , constraint personsalarymaster_PKC primary key (PersonCode,StartDate)
1741 271 h-you
) comment '?S??????^?}?X?^' ;
1742 198 h-you

1743
create index PersonSalaryMaster_Index1
1744
  on personsalarymaster(PersonCode);
1745

1746
create index PersonSalaryMaster_Index2
1747
  on personsalarymaster(StartDate);
1748

1749 342 h-you
create index PersonSalaryMaster_Index3
1750
  on personsalarymaster(MonthlySalary);
1751

1752 271 h-you
-- ?w???????f?[?^
1753 325 h-you
drop table if exists pointingoutcomment cascade;
1754 198 h-you

1755
create table pointingoutcomment (
1756 271 h-you
  ConstructionCode decimal(10,0) not null comment '?H???R?[?h'
1757
  , ProcessNo smallint(6) not null comment '????????i??????j'
1758
  , SeqNo smallint(6) not null comment '????'
1759
  , PageCount smallint(6) not null comment '?y?[?W???'
1760
  , PersonCode decimal(8,0) not null comment '?L????R?[?h'
1761
  , DrowColor varchar(8) comment '?`??F'
1762
  , CommentMessage varchar(1000) comment '???b?Z?[?W'
1763
  , StartPointX smallint(6) not null comment '?w?E?????u?w'
1764
  , StartPointY smallint(6) not null comment '?w?E?????u?x'
1765
  , CurrentPointX smallint(6) not null comment '??????u?w'
1766
  , CurrentPointY smallint(6) not null comment '??????u?x'
1767
  , CurrentWidth smallint(6) not null comment '?\???T?C?YWidth'
1768
  , CurrentHeight smallint(6) not null comment '?\???T?C?YHeigth'
1769
  , EntryDate datetime not null comment '?o?^???t'
1770
  , UpdateDate datetime not null comment '?X?V???t'
1771 198 h-you
  , constraint pointingoutcomment_PKC primary key (ConstructionCode,ProcessNo,SeqNo)
1772 271 h-you
) comment '?w???????f?[?^' ;
1773 198 h-you

1774 271 h-you
-- ?????????????c???^?f?[?^
1775 325 h-you
drop table if exists proceedingsdata cascade;
1776 198 h-you

1777
create table proceedingsdata (
1778 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1779
  , ProceedingsDataDate date not null comment '?c???^????'
1780
  , StartMeetingTime decimal(4,0) unsigned not null comment '??c????J?n'
1781
  , EndMeetingTime decimal(4,0) unsigned not null comment '??c????I??'
1782
  , CreatorCode decimal(8,0) not null comment '????R?[?h'
1783
  , PalceFlag decimal(1,0) not null comment '???n?t???O'
1784
  , MeetingPalce varchar(120) comment '???????'
1785
  , EntryDate datetime not null comment '?o?^???t'
1786
  , UpdateDate datetime not null comment '?X?V???t'
1787 198 h-you
  , constraint proceedingsdata_PKC primary key (ConstructionCode,ProceedingsDataDate,StartMeetingTime)
1788 271 h-you
) comment '?????????????c???^?f?[?^' ;
1789 198 h-you

1790 271 h-you
-- ?????????????c???^?f?[?^?i?o???j
1791 325 h-you
drop table if exists proceedingsdataattend cascade;
1792 198 h-you

1793
create table proceedingsdataattend (
1794 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1795
  , ProceedingsDataDate date not null comment '?c???^????'
1796
  , StartMeetingTime decimal(4,0) unsigned not null comment '??c????J?n'
1797
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
1798
  , Department varchar(20) comment '?o??????'
1799
  , AttendName varchar(10) comment '?o??????'
1800
  , EntryDate datetime not null comment '?o?^???t'
1801
  , UpdateDate datetime not null comment '?X?V???t'
1802 198 h-you
  , constraint proceedingsdataattend_PKC primary key (ConstructionCode,ProceedingsDataDate,StartMeetingTime,SeqNo)
1803 271 h-you
) comment '?????????????c???^?f?[?^?i?o???j' ;
1804 198 h-you

1805 271 h-you
-- ?????????????c???^?f?[?^?i????j
1806 325 h-you
drop table if exists proceedingsdatadetail cascade;
1807 198 h-you

1808
create table proceedingsdatadetail (
1809 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1810
  , ProceedingsDataDate date not null comment '?c???^????'
1811
  , StartMeetingTime decimal(4,0) unsigned not null comment '??c????J?n'
1812
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
1813
  , TitleNo varchar(5) comment '?c????'
1814
  , Title varchar(20) comment '?c??'
1815
  , ContentsText varchar(50) comment '???e'
1816
  , EntryDate datetime not null comment '?o?^???t'
1817
  , UpdateDate datetime not null comment '?X?V???t'
1818 198 h-you
  , constraint proceedingsdatadetail_PKC primary key (ConstructionCode,ProceedingsDataDate,StartMeetingTime,SeqNo)
1819 271 h-you
) comment '?????????????c???^?f?[?^?i????j' ;
1820 198 h-you

1821 271 h-you
-- ???F?f?[?^
1822 325 h-you
drop table if exists processapproval cascade;
1823 198 h-you

1824
create table processapproval (
1825 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1826
  , ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???'
1827
  , OrderNo decimal(2,0) unsigned not null comment '??t???'
1828
  , SeqNo decimal(2,0) not null comment '?}??'
1829
  , PersonCode decimal(8,0) unsigned not null comment '?\???E???F??R?[?h'
1830
  , PetitionApprovalDate datetime not null comment '?\???E???F???t'
1831
  , ApprovalLimitDates datetime not null comment '???F??]??'
1832
  , ApprovalStatus decimal(1,0) not null comment '???F???'
1833
  , InputComment varchar(300) comment '?R?????g'
1834
  , EntryDate datetime not null comment '?o?^???t'
1835
  , UpdateDate datetime not null comment '?X?V???t'
1836 198 h-you
  , constraint processapproval_PKC primary key (ConstructionCode,ApprovalCode,OrderNo,SeqNo)
1837 271 h-you
) comment '???F?f?[?^' ;
1838 198 h-you

1839 271 h-you
-- ???F?R?????g?f?[?^
1840 325 h-you
drop table if exists processapprovalcomment cascade;
1841 198 h-you

1842
create table processapprovalcomment (
1843 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1844
  , ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???'
1845
  , OrderNo decimal(2,0) unsigned not null comment '??t???'
1846
  , CommentNo decimal(2,0) not null comment '?R?????g???'
1847
  , ParentNo decimal(2,0) not null comment '?e?R?????g???'
1848
  , ApproValComment varchar(300) comment '?w???E?A???R?????g'
1849
  , EntryDate datetime not null comment '?o?^???t'
1850
  , UpdateDate datetime not null comment '?X?V???t'
1851 198 h-you
  , constraint processapprovalcomment_PKC primary key (ConstructionCode,ApprovalCode,OrderNo,CommentNo)
1852 271 h-you
) comment '???F?R?????g?f?[?^' ;
1853 198 h-you

1854 271 h-you
-- ???F????f?[?^
1855 325 h-you
drop table if exists processapprovaldetail cascade;
1856 198 h-you

1857
create table processapprovaldetail (
1858 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1859
  , ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???'
1860
  , OrderNo decimal(2,0) unsigned not null comment '??t???'
1861
  , SerialNo decimal(2,0) unsigned not null comment '?}??'
1862
  , LinkCode decimal(10,0) not null comment '?????N???'
1863
  , EntryDate datetime not null comment '?o?^???t'
1864
  , UpdateDate datetime not null comment '?X?V???t'
1865 198 h-you
  , constraint processapprovaldetail_PKC primary key (ConstructionCode,ApprovalCode,OrderNo,SerialNo)
1866 271 h-you
) comment '???F????f?[?^' ;
1867 198 h-you

1868 271 h-you
-- ?N?????}?X?^
1869 325 h-you
drop table if exists processexcutemaster cascade;
1870 198 h-you

1871
create table processexcutemaster (
1872 271 h-you
  SecCode decimal(2,0) unsigned not null comment '???????'
1873
  , ExecCode decimal(4,0) unsigned not null comment '?N?????????'
1874
  , EditFlg decimal(1,0) not null comment '??W?t???O'
1875
  , EntryDate datetime not null comment '?o?^???t'
1876
  , UpdateDate datetime not null comment '?X?V???t'
1877 198 h-you
  , constraint processexcutemaster_PKC primary key (SecCode,ExecCode)
1878 271 h-you
) comment '?N?????}?X?^' ;
1879 198 h-you

1880
create index ProcessExcuteMaster_Index1
1881
  on processexcutemaster(SecCode);
1882

1883
create index ProcessExcuteMaster_Index2
1884
  on processexcutemaster(ExecCode);
1885

1886 271 h-you
-- ???????f?[?^
1887 325 h-you
drop table if exists purchaseorder cascade;
1888 198 h-you

1889
create table purchaseorder (
1890 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1891
  , SeqNo decimal(3,0) unsigned not null comment '???????}??'
1892
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
1893
  , CreateDate date comment '?????t'
1894
  , OrderPrice decimal(12,0) not null comment '???????z'
1895
  , LastRowStringDate date not null comment '??I?s?\?????t'
1896
  , OrderSheetType decimal(1,0) not null comment '???E?{???t???O'
1897
  , PaymentTerms decimal(1,0) not null comment '?x????????'
1898
  , CashRatio decimal(4,1) not null comment '?????????i???j'
1899
  , BillPeriod decimal(4,0) not null comment '??`????'
1900
  , PrePayments decimal(1,0) not null comment '?O????'
1901
  , PrePaymentsDays decimal(3,0) not null comment '?O????????'
1902
  , PrePaymentsPrice decimal(12,0) not null comment '?O???????z'
1903
  , PartialPayment decimal(1,0) not null comment '??????'
1904
  , PartialPaymentMounth decimal(2,0) unsigned not null comment '???????????'
1905
  , PartialPaymentDay1 decimal(2,0) unsigned not null comment '???????????'
1906
  , PartialPaymentDay2 decimal(2,0) unsigned not null comment '???????x????'
1907
  , PartialPaymentPrice decimal(12,0) not null comment '?????????z'
1908
  , CompletionPayment decimal(1,0) not null comment '???n??????x??'
1909
  , CompletionPaymentDays decimal(3,0) unsigned not null comment '???n??????x??????'
1910
  , CompletionPaymentPrice decimal(12,0) not null comment '???n??????x?????z'
1911
  , LeadEngineerCode decimal(8,0) comment '??C?Z?p??R?[?h'
1912 277 h-you
  , LeadEngineerName varchar(60) comment '??C?Z?p???'
1913 271 h-you
  , SafetyOfficerCode decimal(8,0) comment '???S?????R?[?h'
1914
  , SafetyOfficerName varchar(60) comment '???S??????'
1915
  , WorkersCount decimal(3,0) unsigned comment '??????'
1916
  , PrintoutDate date not null comment '????N????'
1917
  , EntryDate datetime not null comment '?o?^???t'
1918
  , UpdateDate datetime not null comment '?X?V???t'
1919 198 h-you
  , constraint purchaseorder_PKC primary key (ConstructionCode,SeqNo)
1920 271 h-you
) comment '???????f?[?^' ;
1921 198 h-you

1922 271 h-you
-- ?????????t?f?[?^
1923 325 h-you
drop table if exists purchaseorderdate cascade;
1924 198 h-you

1925
create table purchaseorderdate (
1926 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1927
  , SeqNo decimal(3,0) unsigned not null comment '???????}??'
1928
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
1929
  , SendDate date not null comment '???????X????'
1930
  , ReturnDate date not null comment '???????????'
1931
  , ReturnCheckDate date not null comment '??????????m?F??'
1932
  , EntryDate datetime not null comment '?o?^???t'
1933
  , UpdateDate datetime not null comment '?X?V???t'
1934 198 h-you
  , constraint purchaseorderdate_PKC primary key (ConstructionCode,SeqNo)
1935 271 h-you
) comment '?????????t?f?[?^' ;
1936 198 h-you

1937 271 h-you
-- ??????????f?[?^
1938 325 h-you
drop table if exists purchaseorderdetail cascade;
1939 198 h-you

1940
create table purchaseorderdetail (
1941 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1942
  , SeqNo decimal(3,0) unsigned not null comment '???????}??'
1943
  , GroupCount decimal(1,0) not null comment '?O???[?v???'
1944
  , LineCount decimal(3,0) unsigned not null comment '?s???'
1945
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
1946
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
1947
  , FirstString varchar(120) comment '?H??E?i??'
1948
  , SecondString varchar(120) comment '???e????'
1949
  , UnitCount decimal(8,2) not null comment '????'
1950
  , UnitName varchar(30) comment '?P??'
1951
  , UnitPrice decimal(10,0) not null comment '?P??'
1952
  , OrdersLinePrice decimal(12,0) comment '???z'
1953 302 h-you
  , SourceCode decimal(10,0) unsigned not null comment '???H?????'
1954
  , SourceDetailCnt decimal(4,0) unsigned not null comment '????????'
1955
  , DataTypeFlag decimal(1,0) unsigned not null comment '?f?[?^?^?C?v?t???O'
1956 271 h-you
  , EntryDate datetime not null comment '?o?^???t'
1957
  , UpdateDate datetime not null comment '?X?V???t'
1958 198 h-you
  , constraint purchaseorderdetail_PKC primary key (ConstructionCode,SeqNo,GroupCount,LineCount)
1959 271 h-you
) comment '??????????f?[?^' ;
1960 198 h-you

1961
create index POrderDetail_Index1
1962
  on purchaseorderdetail(SourceCode);
1963

1964 271 h-you
-- ?????f?[?^
1965 325 h-you
drop table if exists requestdata cascade;
1966 106 bit

1967
create table requestdata (
1968 271 h-you
  REQUESTNO decimal(9,0) not null comment '????No'
1969
  , MAINCONSTRUCTIONCODE decimal(10,0) not null comment '?{?H?????'
1970
  , CONSTRUCTIONNAME varchar(120) not null comment '?H??????'
1971
  , CONTRACTAMOUNT decimal(10,0) not null comment '???????z'
1972
  , PAIDAMOUNT decimal(10,0) not null comment '????????z'
1973
  , REQUESTAMOUNT0 decimal(10,0) not null comment '???????z?O'
1974
  , REQUESTAMOUNT1 decimal(10,0) not null comment '???????z?P'
1975
  , REQUESTAMOUNT2 decimal(10,0) comment '???????z?Q'
1976
  , REQUESTAMOUNT3 decimal(10,0) comment '???????z?R'
1977
  , REQUESTAMOUNT4 decimal(10,0) comment '???????z?S'
1978
  , REQUESTAMOUNT5 decimal(10,0) comment '???????z?T'
1979
  , REQUESTAMOUNT6 decimal(10,0) comment '???????z?U'
1980
  , UNCLAIMEDAMOUNT decimal(10,0) not null comment '?????c???z'
1981
  , UNPAIDAMOUNT decimal(10,0) not null comment '?????????z'
1982
  , TAXAMOUNT decimal(10,0) not null comment '?????'
1983
  , NOTE varchar(120) not null comment '???l'
1984
  , ENTRYDATE datetime not null comment '?o?^?N????'
1985
  , UPDATEDATE datetime not null comment '?X?V?N????'
1986 106 bit
  , constraint requestdata_PKC primary key (REQUESTNO,MAINCONSTRUCTIONCODE)
1987 271 h-you
) comment '?????f?[?^' ;
1988 106 bit

1989 271 h-you
-- ?????f?[?^????
1990 325 h-you
drop table if exists requestdatadetail cascade;
1991 106 bit

1992
create table requestdatadetail (
1993 271 h-you
  REQUESTNO decimal(9,0) not null comment '????No'
1994
  , MAINCONSTRUCTIONCODE decimal(10,0) not null comment '?{?H?????'
1995
  , CONSTRUCTIONCODE decimal(10,0) not null comment '?H?????'
1996
  , CONSTRUCTIONKIND decimal(1,0) not null comment '?H????'
1997
  , REQUESTAMOUNT decimal(10,0) not null comment '???????z'
1998
  , TAXAMOUNT decimal(10,0) not null comment '?????'
1999
  , ENTRYDATE datetime not null comment '?o?^?N????'
2000
  , UPDATEDATE datetime not null comment '?X?V?N????'
2001 106 bit
  , constraint requestdatadetail_PKC primary key (REQUESTNO,MAINCONSTRUCTIONCODE,CONSTRUCTIONCODE,CONSTRUCTIONKIND)
2002 271 h-you
) comment '?????f?[?^????' ;
2003 106 bit

2004 271 h-you
-- ?????w?b?_
2005 325 h-you
drop table if exists requesthead cascade;
2006 106 bit

2007
create table requesthead (
2008 271 h-you
  REQUESTNO decimal(9,0) not null comment '????No'
2009
  , REQCONSTRUCTIONCODE decimal(10,0) not null comment '?????H?????'
2010
  , ORDERNO decimal(2,0) not null comment '??t???'
2011
  , REQUESTMONTH decimal(6,0) not null comment '??????'
2012
  , ORDERERSDIVISION decimal(5,0) not null comment '???????'
2013
  , ORDERERSCODE decimal(5,0) not null comment '??????R?[?h'
2014
  , ORDERERSNAME varchar(120) not null comment '???????'
2015
  , REQCONSTRUCTIONNAME varchar(120) not null comment '?????H??????'
2016
  , REQUESTTOTALAMOUNT decimal(10,0) not null comment '???????z???v'
2017
  , REQUESTAMOUNT decimal(10,0) not null comment '???????z'
2018
  , TAXAMOUNT decimal(10,0) not null comment '?????'
2019
  , UNPAIDAMOUNT decimal(10,0) comment '??????'
2020
  , NOTE varchar(120) comment '???l'
2021
  , ASSIGNEDFLG decimal(1,0) comment '??????t???O'
2022
  , INVOICENO decimal(9,0) not null comment '??????No'
2023
  , ENTRYDATE datetime not null comment '?o?^?N????'
2024
  , UPDATEDATE datetime not null comment '?X?V?N????'
2025 106 bit
  , constraint requesthead_PKC primary key (REQUESTNO)
2026 271 h-you
) comment '?????w?b?_' ;
2027 106 bit

2028
alter table requesthead add unique REQCONSTRUCTIONCODE (REQCONSTRUCTIONCODE,ORDERNO) ;
2029

2030 271 h-you
-- ?????????t?f?[?^
2031 325 h-you
drop table if exists requestorderdate cascade;
2032 106 bit

2033 198 h-you
create table requestorderdate (
2034 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2035
  , InvoiceNo decimal(9,0) not null comment '??????No'
2036
  , SendDate date not null comment '???????????X????'
2037
  , EntryDate datetime not null comment '?o?^???t'
2038
  , UpdateDate datetime not null comment '?X?V???t'
2039 239 h-you
  , constraint requestorderdate_PKC primary key (ConstructionCode,InvoiceNo)
2040 271 h-you
) comment '?????????t?f?[?^' ;
2041 109 bit

2042 271 h-you
-- ????O???t?f?[?^
2043 325 h-you
drop table if exists salesgraphdata cascade;
2044 198 h-you

2045
create table salesgraphdata (
2046 271 h-you
  GraphDataCode decimal(8,0) not null comment '?O???t?f?[?^?R?[?h'
2047
  , ConstructionPeriod decimal(4,0) unsigned not null comment '?????'
2048
  , SalesDataDays date not null comment '????N??'
2049
  , DisplayOrder decimal(8,0) unsigned not null comment '?\????'
2050
  , DataName varchar(100) not null comment '?f?[?^?\??????'
2051
  , SalesAmount decimal(10,0) not null comment '????f?[?^'
2052
  , AdministrativeExpense decimal(10,0) not null comment '???E?????o??'
2053
  , GrossProfit decimal(10,0) not null comment '?e???v'
2054
  , NetIncome decimal(10,0) not null comment '?????v(???v)'
2055
  , EntryDate datetime not null comment '?o?^???t'
2056
  , UpdateDate datetime not null comment '?X?V???t'
2057 198 h-you
  , constraint salesgraphdata_PKC primary key (GraphDataCode,ConstructionPeriod,SalesDataDays)
2058 271 h-you
) comment '????O???t?f?[?^' ;
2059 198 h-you

2060
create index SalesGraphData_Idx1
2061
  on salesgraphdata(DisplayOrder);
2062

2063
create index SalesGraphData_idx2
2064
  on salesgraphdata(ConstructionPeriod);
2065

2066 271 h-you
-- ?????}?X?^
2067 325 h-you
drop table if exists securitymaster cascade;
2068 198 h-you

2069
create table securitymaster (
2070 271 h-you
  SecCode decimal(2,0) unsigned not null comment '???????'
2071
  , DisplayOrder decimal(2,0) not null comment '?\????'
2072
  , SecName varchar(60) not null comment '????????'
2073
  , SecRank decimal(1,0) not null comment '?????????N'
2074
  , SecRange decimal(1,0) not null comment '???????'
2075
  , GeneralAffairs decimal(1,0) not null comment '????????t???O'
2076
  , SelectBackColor varchar(8) not null comment '?I??w?i?F'
2077
  , EntryDate datetime not null comment '?o?^???t'
2078
  , UpdateDate datetime not null comment '?X?V???t'
2079 198 h-you
  , constraint securitymaster_PKC primary key (SecCode)
2080 271 h-you
) comment '?????}?X?^' ;
2081 198 h-you

2082
create index SecurityMaster_Index1
2083
  on securitymaster(DisplayOrder);
2084

2085
create index SecurityMaster_Index2
2086
  on securitymaster(SecRank);
2087

2088
create index SecurityMaster_Index3
2089
  on securitymaster(SecRange);
2090

2091 271 h-you
-- ???S?p?g???[???f?[?^
2092 325 h-you
drop table if exists sfpdata cascade;
2093 239 h-you

2094
create table sfpdata (
2095 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2096
  , DataCount decimal(2,0) unsigned not null comment '?p?g???[????'
2097
  , RequestDate datetime not null comment '?p?g???[???v??????'
2098
  , PersonCode decimal(8,0) unsigned not null comment '?\????R?[?h'
2099
  , StringValue varchar(300) comment '?R?????g'
2100
  , OrderNo decimal(2,0) unsigned not null comment '?\????t???'
2101
  , EntryDate datetime not null comment '?o?^???t'
2102
  , UpdateDate datetime not null comment '?X?V???t'
2103 239 h-you
  , constraint sfpdata_PKC primary key (ConstructionCode,DataCount)
2104 271 h-you
) comment '???S?p?g???[???f?[?^' ;
2105 239 h-you

2106
create index SFPData_Index1
2107
  on sfpdata(RequestDate);
2108

2109 271 h-you
-- ???S?p?g???[??????f?[?^
2110 325 h-you
drop table if exists sfpdatadetail cascade;
2111 239 h-you

2112
create table sfpdatadetail (
2113 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2114
  , DataCount decimal(2,0) unsigned not null comment '?p?g???[????'
2115
  , SeqNo decimal(2,0) unsigned not null comment '?f?[?^?}??'
2116
  , CompanyCode decimal(8,0) unsigned not null comment '??????R?[?h'
2117
  , EntryDate datetime not null comment '?o?^???t'
2118
  , UpdateDate datetime not null comment '?X?V???t'
2119 239 h-you
  , constraint sfpdatadetail_PKC primary key (ConstructionCode,DataCount,SeqNo)
2120 271 h-you
) comment '???S?p?g???[??????f?[?^' ;
2121 239 h-you

2122 271 h-you
-- ??????{?H?H??o?^?\???f?[?^
2123 325 h-you
drop table if exists subconstrjobitemregist cascade;
2124 198 h-you

2125
create table subconstrjobitemregist (
2126 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '?\??????'
2127
  , CreateDate date not null comment '????'
2128
  , SeqNo decimal(2,0) unsigned not null comment '?\???A??'
2129
  , DisplayOrder decimal(8,0) unsigned not null comment '?\????'
2130
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
2131
  , EntryDate datetime not null comment '?o?^???t'
2132
  , UpdateDate datetime not null comment '?X?V???t'
2133 198 h-you
  , constraint subconstrjobitemregist_PKC primary key (PersonCode,CreateDate,SeqNo,DisplayOrder)
2134 271 h-you
) comment '??????{?H?H??o?^?\???f?[?^' ;
2135 198 h-you

2136 271 h-you
-- ??????E?????N?o?^?\???f?[?^
2137 325 h-you
drop table if exists subconstrjoblinkregist cascade;
2138 198 h-you

2139
create table subconstrjoblinkregist (
2140 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '?\??????'
2141
  , CreateDate date not null comment '????'
2142
  , SeqNo decimal(2,0) unsigned not null comment '?\???A??'
2143
  , DisplayOrder decimal(8,0) unsigned not null comment '?\????'
2144
  , JobCategoryCode decimal(5,0) not null comment '?E??L?['
2145
  , EntryDate datetime not null comment '?o?^???t'
2146
  , UpdateDate datetime not null comment '?X?V???t'
2147 198 h-you
  , constraint subconstrjoblinkregist_PKC primary key (PersonCode,CreateDate,SeqNo,DisplayOrder)
2148 271 h-you
) comment '??????E?????N?o?^?\???f?[?^' ;
2149 198 h-you

2150 271 h-you
-- ??????o?^?\???f?[?^
2151 325 h-you
drop table if exists subconstrregist cascade;
2152 198 h-you

2153
create table subconstrregist (
2154 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '?\??????'
2155
  , CreateDate date not null comment '????'
2156
  , SeqNo decimal(2,0) unsigned not null comment '?\???A??'
2157
  , DataMode decimal(1,0) comment '?f?[?^??'
2158
  , SourceCode decimal(8,0) not null comment '??????R?[?h'
2159
  , PetitionPeriod decimal(4,0) unsigned not null comment '?\???N?x'
2160
  , CorporateStatusName varchar(40) comment '?@?l?i????'
2161
  , CorporateStatusPoint decimal(1,0) not null comment '?@?l?i?????u'
2162
  , CompanyName varchar(100) not null comment '???????'
2163
  , CEOPositionName varchar(60) comment '??\???E??'
2164
  , CEOName varchar(60) comment '??\?????'
2165
  , ContactPersonName varchar(60) comment '?S???????'
2166
  , ZipCode varchar(8) comment '?X????'
2167
  , Address1 varchar(60) comment '?Z???P'
2168
  , Address2 varchar(60) comment '?Z??2'
2169
  , Address3 varchar(60) comment '?Z??3'
2170
  , CellPhoneNumber varchar(13) comment '?g??d?b???'
2171
  , MailAddress varchar(257) comment '???[???A?h???X'
2172
  , PhoneNumber varchar(13) comment '?d?b???'
2173
  , FaxNumber varchar(13) comment 'FAX???'
2174
  , JapaneseSyllabary varchar(2) comment '50?????'
2175
  , StartDate date not null comment '????J?n?N????'
2176
  , Note varchar(300) comment '???l'
2177
  , labourKind decimal(1,0) not null comment '?x???????E????'
2178
  , OrderDate date comment '?\????'
2179
  , OrderNo decimal(2,0) unsigned not null comment '?\????t???'
2180
  , EntryDate datetime not null comment '?o?^???t'
2181
  , UpdateDate datetime not null comment '?X?V???t'
2182 198 h-you
  , constraint subconstrregist_PKC primary key (PersonCode,CreateDate,SeqNo)
2183 271 h-you
) comment '??????o?^?\???f?[?^' ;
2184 198 h-you

2185 271 h-you
-- ??????H??}?X?^
2186 325 h-you
drop table if exists subcontractoritemmaster cascade;
2187 198 h-you

2188
create table subcontractoritemmaster (
2189 271 h-you
  ItemCode decimal(5,0) unsigned not null comment '?H??L?['
2190
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2191
  , ItemName varchar(120) not null comment '?H????'
2192
  , DeleteFlg decimal(1,0) not null comment '???t???O'
2193
  , EntryDate datetime not null comment '?o?^???t'
2194
  , UpdateDate datetime not null comment '?X?V???t'
2195 198 h-you
  , constraint subcontractoritemmaster_PKC primary key (ItemCode)
2196 271 h-you
) comment '??????H??}?X?^' ;
2197 198 h-you

2198 271 h-you
-- ??????E??}?X?^
2199 325 h-you
drop table if exists subcontractorjobcategory cascade;
2200 198 h-you

2201
create table subcontractorjobcategory (
2202 271 h-you
  JobCategoryCode decimal(5,0) not null comment '?E??L?['
2203
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2204
  , JobCategoryName varchar(120) not null comment '?E????'
2205
  , DeleteFlg decimal(1,0) not null comment '???t???O'
2206
  , EntryDate datetime not null comment '?o?^???t'
2207
  , UpdateDate datetime not null comment '?X?V???t'
2208 198 h-you
  , constraint subcontractorjobcategory_PKC primary key (JobCategoryCode)
2209 271 h-you
) comment '??????E??}?X?^' ;
2210 198 h-you

2211 271 h-you
-- ??????{?H?H??f?[?^
2212 325 h-you
drop table if exists subcontractorjobitem cascade;
2213 198 h-you

2214
create table subcontractorjobitem (
2215 271 h-you
  CompanyCode decimal(8,0) not null comment '??????R?[?h'
2216
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
2217
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2218
  , EntryDate datetime not null comment '?o?^???t'
2219
  , UpdateDate datetime not null comment '?X?V???t'
2220 198 h-you
  , constraint subcontractorjobitem_PKC primary key (CompanyCode,ItemCode)
2221 271 h-you
) comment '??????{?H?H??f?[?^' ;
2222 198 h-you

2223
create index SubContractorJobItem_Index1
2224
  on subcontractorjobitem(CompanyCode);
2225

2226
create index SubContractorJobItem_Index2
2227
  on subcontractorjobitem(ItemCode);
2228

2229 271 h-you
-- ??????E?????N?}?X?^
2230 325 h-you
drop table if exists subcontractorjoblink cascade;
2231 198 h-you

2232
create table subcontractorjoblink (
2233 271 h-you
  CompanyCode decimal(8,0) not null comment '??????R?[?h'
2234
  , JobCategoryCode decimal(5,0) not null comment '?E??L?['
2235
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2236
  , EntryDate datetime not null comment '?o?^???t'
2237
  , UpdateDate datetime not null comment '?X?V???t'
2238 198 h-you
  , constraint subcontractorjoblink_PKC primary key (CompanyCode,JobCategoryCode)
2239 271 h-you
) comment '??????E?????N?}?X?^' ;
2240 198 h-you

2241
create index SubContractorJobLink_Index1
2242
  on subcontractorjoblink(CompanyCode);
2243

2244
create index SubContractorJobLink_Index2
2245
  on subcontractorjoblink(JobCategoryCode);
2246

2247 271 h-you
-- ??????}?X?^
2248 325 h-you
drop table if exists subcontractormaster cascade;
2249 198 h-you

2250
create table subcontractormaster (
2251 271 h-you
  CompanyCode decimal(8,0) not null comment '??????R?[?h'
2252
  , DisplayOrder decimal(8,0) unsigned not null comment '?\????'
2253
  , CorporateStatusName varchar(40) comment '?@?l?i????'
2254
  , CorporateStatusPoint decimal(1,0) not null comment '?@?l?i?????u'
2255
  , CompanyName varchar(100) not null comment '???????'
2256
  , CEOPositionName varchar(60) comment '??\???E??'
2257
  , CEOName varchar(60) comment '??\?????'
2258
  , ContactPersonName varchar(60) comment '?S???????'
2259
  , ZipCode varchar(8) comment '?X????'
2260
  , Address1 varchar(60) comment '?Z???P'
2261
  , Address2 varchar(60) comment '?Z??2'
2262
  , Address3 varchar(60) comment '?Z??3'
2263
  , CellPhoneNumber varchar(13) comment '?g??d?b???'
2264
  , MailAddress varchar(257) comment '???[???A?h???X'
2265
  , PhoneNumber varchar(13) comment '?d?b???'
2266
  , FaxNumber varchar(13) comment 'FAX???'
2267
  , JapaneseSyllabary varchar(2) comment '50?????'
2268
  , StartDate date not null comment '????J?n?N????'
2269
  , Note varchar(300) comment '???l'
2270
  , labourKind decimal(1,0) not null comment '?x???????E????'
2271
  , DeleteFlg decimal(1,0) default '0' not null comment '???t???O'
2272
  , EntryDate datetime not null comment '?o?^???t'
2273
  , UpdateDate datetime not null comment '?X?V???t'
2274 198 h-you
  , constraint subcontractormaster_PKC primary key (CompanyCode)
2275 271 h-you
) comment '??????}?X?^' ;
2276 198 h-you

2277
create index SubContractorMaster_Index1
2278
  on subcontractormaster(JapaneseSyllabary);
2279

2280 271 h-you
-- ?d????}?X?^
2281 325 h-you
drop table if exists suppliersmaster cascade;
2282 198 h-you

2283
create table suppliersmaster (
2284 271 h-you
  SuppliersCode decimal(5,0) unsigned not null comment '?d????R?[?h'
2285
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2286
  , SuppliersName1 varchar(60) not null comment '?d????1'
2287
  , SuppliersName2 varchar(60) comment '?d?????Q'
2288
  , ZipCode varchar(8) comment '?X????'
2289
  , Address1 varchar(60) comment '?Z???P'
2290
  , Address2 varchar(60) comment '?Z??2'
2291
  , Address3 varchar(60) comment '?Z??3'
2292
  , PhoneNumber varchar(13) comment '?d?b???'
2293
  , FaxNumber varchar(13) comment 'FAX???'
2294
  , Note varchar(300) comment '???l'
2295
  , DeleteFlg decimal(1,0) not null comment '???t???O'
2296
  , EntryDate datetime not null comment '?o?^???t'
2297
  , UpdateDate datetime not null comment '?X?V???t'
2298 198 h-you
  , constraint suppliersmaster_PKC primary key (SuppliersCode)
2299 271 h-you
) comment '?d????}?X?^' ;
2300 198 h-you

2301 271 h-you
-- ?V?X?e???N???m?F?f?[?^
2302 325 h-you
drop table if exists systemexecute cascade;
2303 198 h-you

2304
create table systemexecute (
2305 271 h-you
  PrimaryCode tinyint(4) not null comment '?L?[????'
2306
  , TargetDate date not null comment '?N?????t'
2307
  , SystemVersion int(11) not null comment '?{??E????o?[?W????'
2308
  , UpDateCopyVersion int(11) not null comment '?R?s?[?o?[?W????'
2309
  , EntryDate datetime not null comment '?o?^???t'
2310
  , UpdateDate datetime not null comment '?X?V???t'
2311 198 h-you
  , constraint systemexecute_PKC primary key (PrimaryCode)
2312 271 h-you
) comment '?V?X?e???N???m?F?f?[?^' ;
2313 198 h-you

2314 271 h-you
-- ????}?X?^
2315 325 h-you
drop table if exists systemmaster cascade;
2316 198 h-you

2317
create table systemmaster (
2318 271 h-you
  SystemCode decimal(3,0) unsigned not null comment '???R?[?h'
2319
  , CompanyName1 varchar(60) not null comment '?????P'
2320
  , CompanyName2 varchar(60) comment '?????Q'
2321
  , CEOName varchar(60) not null comment '??\?????'
2322
  , CEOPositionName varchar(60) comment '??\???E??'
2323
  , ZipCode varchar(8) not null comment '?X????'
2324
  , Address1 varchar(60) not null comment '?Z???P'
2325
  , Address2 varchar(60) comment '?Z??2'
2326
  , Address3 varchar(60) comment '?Z??3'
2327
  , PhoneNumber varchar(13) not null comment '?d?b???'
2328
  , FaxNumber varchar(13) comment 'FAX???'
2329
  , HomePageURL varchar(120) comment '?z?[???y?[?WURL'
2330
  , ConsumptionTax decimal(4,2) not null comment '?????'
2331
  , CooperationRate decimal(4,2) not null comment '???????'
2332
  , StatutoryWelfareRate decimal(4,2) not null comment '?@???????'
2333
  , FuelPrice decimal(5,2) not null comment '?R???L???P??'
2334
  , AreaDistance decimal(5,2) not null comment '????u????????'
2335
  , ExcelSavePath varchar(120) comment 'Excel????p?X'
2336
  , BusinessPeriod smallint(6) not null comment '????c?????'
2337 324 h-you
  , ConstrYear smallint(6) not null comment '????H???N?x'
2338
  , BusinessBeginDate datetime not null comment '?c????????'
2339
  , ConstrBeginDate datetime not null comment '?H???N?x?????'
2340
  , BusinessCompDate datetime not null comment '?c?????????'
2341
  , ConstrCompDate datetime not null comment '?H???N?x??????'
2342 271 h-you
  , ConstructionNoBase decimal(1,0) not null comment '?H????????l'
2343
  , SloganString1 varchar(100) comment '?W??1'
2344
  , SloganString2 varchar(100) comment '?W??2'
2345
  , SloganString3 varchar(100) comment '?W??3'
2346
  , EntryDate datetime not null comment '?o?^???t'
2347
  , UpdateDate datetime not null comment '?X?V???t'
2348 198 h-you
  , constraint systemmaster_PKC primary key (SystemCode)
2349 271 h-you
) comment '????}?X?^' ;
2350 198 h-you

2351 271 h-you
-- ?????}?X?^
2352 325 h-you
drop table if exists termmaster cascade;
2353 198 h-you

2354
create table termmaster (
2355 271 h-you
  ConstructionStatusFlg decimal(2,0) not null comment '?H?????t???O'
2356
  , FieldNo decimal(2,0) not null comment '?`?F?b?N???t?B?[???h???'
2357
  , SeqNo decimal(2,0) not null comment '?}??'
2358
  , DisplayOrder decimal(2,0) not null comment '?\????'
2359
  , CheckSchdule decimal(1,0) not null comment '?`?F?b?N?^?C?~???O'
2360
  , TermDays decimal(3,0) not null comment '?o???'
2361
  , SendTitile varchar(100) comment '?^?C?g??'
2362
  , SendMessage varchar(100) comment '???b?Z?[?W'
2363
  , BackColor varchar(8) comment '?w?i?F'
2364
  , ForeColor varchar(8) comment '?????F'
2365
  , EntryDate datetime not null comment '?o?^???t'
2366
  , UpdateDate datetime not null comment '?X?V???t'
2367 198 h-you
  , constraint termmaster_PKC primary key (ConstructionStatusFlg,FieldNo,SeqNo)
2368 271 h-you
) comment '?????}?X?^' ;
2369 198 h-you

2370
create index TermMaster_Index1
2371
  on termmaster(DisplayOrder);
2372

2373 271 h-you
-- ?o?????f?[?^
2374 325 h-you
drop table if exists tranceportdailydata cascade;
2375 198 h-you

2376
create table tranceportdailydata (
2377 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
2378
  , AttendanceDate date not null comment '???????'
2379
  , StartDistance decimal(7,1) not null comment '?????o???L????'
2380
  , ComplateDistance decimal(7,1) not null comment '?????I???L????'
2381
  , TotalDistance decimal(6,1) not null comment '???????v?L????'
2382
  , OfficeGoFlg decimal(1,0) not null comment '???????o??t???O'
2383
  , OfficeOutFlg decimal(1,0) not null comment '???????A??t???O'
2384
  , TrancePayGoFlg decimal(1,0) not null comment '?L?????o??t???O'
2385
  , TrancePayOutFlg decimal(1,0) not null comment '?L?????A??t???O'
2386
  , WareHouseFlg decimal(1,0) not null comment '????u??t???O'
2387
  , EntryDate datetime not null comment '?o?^???t'
2388
  , UpdateDate datetime not null comment '?X?V???t'
2389 198 h-you
  , constraint tranceportdailydata_PKC primary key (PersonCode,AttendanceDate)
2390 271 h-you
) comment '?o?????f?[?^' ;
2391 198 h-you

2392
create index TranceportDailyData_Index1
2393
  on tranceportdailydata(AttendanceDate);
2394

2395 271 h-you
-- ?H?????o???}?X?^
2396 325 h-you
drop table if exists typeexpensesmaster cascade;
2397 198 h-you

2398
create table typeexpensesmaster (
2399 271 h-you
  TypeCode decimal(5,0) unsigned not null comment '?H?????R?[?h'
2400
  , ExpensesPeriod smallint(6) not null comment '?????'
2401
  , NameCode decimal(5,0) unsigned not null comment '?o????R?[?h'
2402
  , ExpensesRaito decimal(4,2) not null comment '?o??'
2403
  , DeleteFlg decimal(1,0) not null comment '???t???O'
2404
  , EntryDate datetime not null comment '?o?^???t'
2405
  , UpdateDate datetime not null comment '?X?V???t'
2406 198 h-you
  , constraint typeexpensesmaster_PKC primary key (TypeCode,ExpensesPeriod,NameCode)
2407 271 h-you
) comment '?H?????o???}?X?^' ;
2408 198 h-you

2409 271 h-you
-- ?P??}?X?^
2410 325 h-you
drop table if exists unitmaster cascade;
2411 198 h-you

2412
create table unitmaster (
2413 271 h-you
  UnitKey decimal(5,0) unsigned not null comment '?P??L?['
2414
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2415
  , UnitName varchar(30) not null comment '?P?????'
2416
  , EntryDate datetime not null comment '?o?^???t'
2417
  , UpdateDate datetime not null comment '?X?V???t'
2418 198 h-you
  , constraint unitmaster_PKC primary key (UnitKey)
2419 271 h-you
) comment '?P??}?X?^' ;
2420 198 h-you

2421
create index UnitMaster_Index1
2422
  on unitmaster(DisplayOrder);
2423

2424 271 h-you
-- ????}?X?^
2425 325 h-you
drop table if exists vehiclemaster cascade;
2426 198 h-you

2427
create table vehiclemaster (
2428 271 h-you
  VehicleCode decimal(5,0) unsigned not null comment '????R?[?h'
2429
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2430
  , VehicleName varchar(100) not null comment '???????'
2431
  , RegistrationNumber varchar(30) comment '?o?^???'
2432
  , IdentificationNumber varchar(30) comment '?????'
2433
  , ModelCode varchar(30) comment '?^??'
2434
  , DepartmentCode decimal(5,0) unsigned not null comment '???????'
2435
  , VehicleScheduleFlg decimal(1,0) not null comment '????\??\???t???O'
2436
  , PurchaseDate date comment '?w????'
2437
  , PurchaseName varchar(30) comment '?w????'
2438
  , PurchaseContactPersons varchar(30) comment '?w????S????'
2439
  , PurchasePhone varchar(13) comment '?w????d?b???'
2440
  , LeaseDate date comment '???[?X?J?n??'
2441
  , LeaseDestination varchar(30) comment '???[?X??'
2442
  , LeaseContactPersons varchar(30) comment '???[?X??S????'
2443
  , LeasePhone varchar(13) comment '???[?X??d?b???'
2444
  , InsuranceCompany varchar(30) comment '?C???????'
2445
  , InsuranceContactPersons varchar(30) comment '?C???????S????'
2446
  , InsurancePhone varchar(13) comment '?C???????d?b???'
2447
  , Note varchar(300) comment '???l'
2448
  , EntryDate datetime comment '?o?^???t'
2449
  , UpdateDate datetime comment '?X?V???t'
2450 198 h-you
  , constraint vehiclemaster_PKC primary key (VehicleCode)
2451 271 h-you
) comment '????}?X?^' ;
2452 198 h-you

2453 271 h-you
-- ????L?^?f?[?^
2454 325 h-you
drop table if exists vehiclerecorddata cascade;
2455 198 h-you

2456
create table vehiclerecorddata (
2457 271 h-you
  VehicleCode decimal(5,0) unsigned not null comment '????R?[?h'
2458
  , DivisionCode decimal(2,0) unsigned not null comment '?f?[?^??'
2459
  , SeqNo decimal(2,0) not null comment '?}??'
2460
  , RecordDate date comment '???n??'
2461
  , Mileage mediumint(9) comment '???s????'
2462
  , Content varchar(100) comment '???e'
2463
  , PaymentCost decimal(10,0) comment '??p'
2464
  , EntryDate datetime not null comment '?o?^???t'
2465
  , UpdateDate datetime not null comment '?X?V???t'
2466 198 h-you
  , constraint vehiclerecorddata_PKC primary key (VehicleCode,DivisionCode,SeqNo)
2467 271 h-you
) comment '????L?^?f?[?^' ;
2468 198 h-you

2469 271 h-you
-- ????\??f?[?^
2470 325 h-you
drop table if exists vehiclescheduledata cascade;
2471 198 h-you

2472
create table vehiclescheduledata (
2473 271 h-you
  TargetDate date not null comment '????'
2474
  , VehicleCode decimal(5,0) unsigned not null comment '????R?[?h'
2475
  , MorningAfternoon decimal(1,0) not null comment '??O?E???'
2476
  , PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
2477
  , TargetYear year(4) not null comment '?Y???N'
2478
  , TargetMonth tinyint(3) unsigned not null comment '?Y????'
2479
  , TargetDay year(4) not null comment '?Y????'
2480
  , EntryDate datetime not null comment '?o?^???t'
2481
  , UpdateDate datetime not null comment '?X?V???t'
2482 198 h-you
  , constraint vehiclescheduledata_PKC primary key (TargetDate,VehicleCode,MorningAfternoon)
2483 271 h-you
) comment '????\??f?[?^' ;
2484 198 h-you

2485
create index VehicleScheduleData_Index1
2486
  on vehiclescheduledata(TargetYear);
2487

2488
create index VehicleScheduleData_Index2
2489
  on vehiclescheduledata(TargetMonth);
2490

2491
create index VehicleScheduleData_Index3
2492
  on vehiclescheduledata(TargetDay);
2493

2494 271 h-you
-- ?N?}?X?^
2495 325 h-you
drop table if exists yearmaster cascade;
2496 198 h-you

2497
create table yearmaster (
2498 271 h-you
  years smallint(6) not null comment '?N'
2499 338 h-you
  , constraint yearmaster_PKC primary key (years)
2500 271 h-you
) comment '?N?}?X?^' ;