プロジェクト

全般

プロフィール

統計
| リビジョン:

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

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

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

1108 198 h-you
create index DailyDataVehicles_Index
1109
  on dailydatavehicles(PersonCode,DailyDataDate,ConstructionCode);
1110 84 h-you

1111 271 h-you
-- ???}?X?^
1112 325 h-you
drop table if exists daymaster cascade;
1113 84 h-you

1114 198 h-you
create table daymaster (
1115 271 h-you
  days smallint(6) not null comment '??'
1116 338 h-you
  , constraint daymaster_PKC primary key (days)
1117 271 h-you
) comment '???}?X?^' ;
1118 84 h-you

1119 271 h-you
-- ?????}?X?^
1120 325 h-you
drop table if exists deadlinemaster cascade;
1121 106 bit

1122
create table deadlinemaster (
1123 271 h-you
  LABOURKIND decimal(1,0) default '0' not null comment '??????'
1124
  , DEADLINE decimal(2,0) comment '????'
1125
  , PAYDAY decimal(2,0) comment '?x????'
1126
  , NOTE varchar(120) comment '???l'
1127
  , DELETEFLG decimal(1,0) comment '???t???O'
1128
  , ENTRYDATE datetime comment '?o?^???t'
1129
  , UPDATEDATE datetime comment '?X?V???t'
1130 106 bit
  , constraint deadlinemaster_PKC primary key (LABOURKIND)
1131 271 h-you
) comment '?????}?X?^' ;
1132 106 bit

1133 271 h-you
-- ?????o???}?X?^
1134 325 h-you
drop table if exists departmentexpensesmaster cascade;
1135 198 h-you

1136
create table departmentexpensesmaster (
1137 271 h-you
  DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
1138
  , ExpensesPeriod smallint(6) not null comment '?????'
1139 342 h-you
  , NameCode decimal(5,0) unsigned not null comment '?o??R?[?h'
1140
  , NameString varchar(100) not null comment '????'
1141 271 h-you
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
1142
  , ExpensesRaito decimal(4,2) not null comment '?o??'
1143
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1144
  , EntryDate datetime not null comment '?o?^???t'
1145
  , UpdateDate datetime not null comment '?X?V???t'
1146 198 h-you
  , constraint departmentexpensesmaster_PKC primary key (DepartmentCode,ExpensesPeriod,NameCode)
1147 271 h-you
) comment '?????o???}?X?^' ;
1148 198 h-you

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

1152
create table departmentmaster (
1153 271 h-you
  DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
1154
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
1155
  , DepartmentString varchar(100) not null comment '??????'
1156
  , ActionScheduleFlg decimal(1,0) not null comment '?s???\??\???t???O'
1157
  , StaffAssignFlg decimal(1,0) not null comment '?l???z?u?\???t???O'
1158 338 h-you
  , StartDate datetime not null comment '?J?n???t'
1159
  , CompDate datetime not null comment '?I?????t'
1160 271 h-you
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1161
  , EntryDate datetime not null comment '?o?^???t'
1162
  , UpdateDate datetime not null comment '?X?V???t'
1163 198 h-you
  , constraint departmentmaster_PKC primary key (DepartmentCode)
1164 271 h-you
) comment '?????}?X?^' ;
1165 198 h-you

1166
create index DepartmentMaster_index1
1167
  on departmentmaster(DisplayOrder);
1168

1169 271 h-you
-- ?????m?F???F?f?[?^
1170 325 h-you
drop table if exists depositapprovalinfo cascade;
1171 198 h-you

1172 106 bit
create table depositapprovalinfo (
1173 271 h-you
  ORDERERSDIVISION decimal(5,0) not null comment '???????'
1174
  , ORDERERSCODE decimal(5,0) not null comment '??????R?[?h'
1175
  , TARGETDATE decimal(6,0) not null comment '???N??'
1176
  , SEQNO decimal(3,0) not null comment '?A??'
1177
  , LINECOUNT decimal(3,0) not null comment '?s???'
1178
  , APPROVALNO decimal(3,0) not null comment '???F????'
1179
  , APPROVALPERSON decimal(8,0) comment '???F??R?[?h'
1180
  , APPROVALPERSONNAME varchar(20) comment '???F???'
1181
  , APPROVALAUTHORITY decimal(1,0) comment '???F??????'
1182
  , APPROVALDATE date comment '???F???t'
1183
  , ENTRYDATE datetime comment '?o?^???t'
1184
  , UPDATEDATE datetime comment '?X?V???t'
1185 106 bit
  , constraint depositapprovalinfo_PKC primary key (ORDERERSDIVISION,ORDERERSCODE,TARGETDATE,SEQNO,LINECOUNT,APPROVALNO)
1186 271 h-you
) comment '?????m?F???F?f?[?^' ;
1187 106 bit

1188 271 h-you
-- ?????f?[?^
1189 325 h-you
drop table if exists depositdata cascade;
1190 106 bit

1191
create table depositdata (
1192 271 h-you
  ORDERERSDIVISION decimal(5,0) not null comment '???????'
1193
  , ORDERERSCODE decimal(5,0) not null comment '??????R?[?h'
1194
  , TARGETDATE decimal(6,0) not null comment '???N??'
1195
  , SEQNO decimal(3,0) not null comment '?A??'
1196
  , BUSINESSPERIOD decimal(4,0) comment '?c???'
1197
  , DEPOSITDATE date comment '??????'
1198
  , DEPOSITAMOUNT decimal(12,0) comment '???????z'
1199
  , DEPOSITAMOUNTCASH decimal(10,0) comment '???????z?i?????j'
1200
  , DEPOSITAMOUNTBILL decimal(10,0) comment '???????z?i??`?j'
1201
  , DEPOSITPERSONCODE decimal(8,0) not null comment '?????S????R?[?h'
1202
  , NOTE varchar(120) comment '???l'
1203
  , ENTRYDATE datetime comment '?o?^???t'
1204
  , UPDATEDATE datetime comment '?X?V???t'
1205 106 bit
  , constraint depositdata_PKC primary key (ORDERERSDIVISION,ORDERERSCODE,TARGETDATE,SEQNO)
1206 271 h-you
) comment '?????f?[?^' ;
1207 106 bit

1208 271 h-you
-- ????????f?[?^
1209 325 h-you
drop table if exists depositdatadetail cascade;
1210 106 bit

1211
create table depositdatadetail (
1212 271 h-you
  ORDERERSDIVISION decimal(5,0) not null comment '???????'
1213
  , ORDERERSCODE decimal(5,0) not null comment '??????R?[?h'
1214
  , TARGETDATE decimal(6,0) not null comment '???N??'
1215
  , REQUESTNO decimal(10,0) not null comment '????No'
1216
  , ORDERNO decimal(2,0) comment '??t???'
1217
  , DEPOSITAMOUNT decimal(10,0) comment '???????z'
1218
  , DISCOUNTAMOUNT decimal(10,0) comment '?l???????z'
1219
  , CNSTRPRICE decimal(10,0) comment '?????'
1220
  , FEES decimal(10,0) comment '????'
1221
  , OTHERADJUSTMENTS decimal(10,0) comment '?????'
1222
  , DIFFERENCEAMOUNT decimal(10,0) comment '????'
1223
  , CONFIRMATIONPERSONCODE decimal(8,0) comment '?m?F?S????R?[?h'
1224
  , CONFIRMATIONDATE date comment '?S????m?F???t'
1225
  , CONFIRMATIONENDFLG decimal(1,0) comment '?m?F?????t???O'
1226
  , NOTE varchar(120) comment '???l'
1227
  , ENTRYDATE datetime comment '?o?^???t'
1228
  , UPDATEDATE datetime comment '?X?V???t'
1229 184 bit
  , constraint depositdatadetail_PKC primary key (ORDERERSDIVISION,ORDERERSCODE,TARGETDATE,REQUESTNO)
1230 271 h-you
) comment '????????f?[?^' ;
1231 106 bit

1232 271 h-you
-- ???}?X?^
1233 325 h-you
drop table if exists divisionmaster cascade;
1234 198 h-you

1235
create table divisionmaster (
1236 271 h-you
  DivisionCode decimal(5,0) unsigned not null comment '???R?[?h'
1237
  , NameCode decimal(5,0) unsigned not null comment '????R?[?h'
1238
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
1239
  , NameString varchar(100) not null comment '????'
1240
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1241
  , EntryDate datetime not null comment '?o?^???t'
1242
  , UpdateDate datetime not null comment '?X?V???t'
1243 198 h-you
  , constraint divisionmaster_PKC primary key (DivisionCode,NameCode)
1244 271 h-you
) comment '???}?X?^' ;
1245 198 h-you

1246 271 h-you
-- ??Z?\?Z???f?[?^
1247 325 h-you
drop table if exists estimatebudget cascade;
1248 198 h-you

1249
create table estimatebudget (
1250 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1251
  , ConstructionTime decimal(5,2) unsigned not null comment '?H??'
1252
  , IntegratedCode decimal(8,0) not null comment '??Z??'
1253
  , DataCreateDate datetime not null comment '?f?[?^??????'
1254
  , RetValue1 decimal(12,0) not null comment '?\???i'
1255
  , RetValue2 decimal(12,0) not null comment '????H????'
1256
  , RetValue3 decimal(12,0) not null comment '????????????'
1257
  , RetValue4 decimal(12,0) not null comment '????????????'
1258
  , RetPercent decimal(5,2) not null comment '???????'
1259
  , EntryDate datetime not null comment '?o?^???t'
1260
  , UpdateDate datetime not null comment '?X?V???t'
1261 198 h-you
  , constraint estimatebudget_PKC primary key (ConstructionCode)
1262 271 h-you
) comment '??Z?\?Z???f?[?^' ;
1263 198 h-you

1264 271 h-you
-- ??Z?\?Z????f?[?^????
1265 325 h-you
drop table if exists estimatebudgetdetail cascade;
1266 198 h-you

1267
create table estimatebudgetdetail (
1268 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1269
  , GroupCount decimal(2,0) unsigned not null comment '?O???[?v???'
1270
  , LineCount decimal(3,0) unsigned not null comment '?s???'
1271
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
1272
  , ItemCode decimal(5,0) unsigned comment '?H??L?['
1273
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
1274
  , FirstString varchar(120) comment '???????'
1275
  , SecondString varchar(120) comment '?H????E???????'
1276
  , Content varchar(120) comment '???e'
1277
  , EstimatePrice decimal(12,0) not null comment '????????z'
1278
  , NegotiationPrice decimal(12,0) not null comment '????????z'
1279
  , Notes varchar(120) comment '???????'
1280
  , EntryDate datetime not null comment '?o?^???t'
1281
  , UpdateDate datetime not null comment '?X?V???t'
1282 198 h-you
  , constraint estimatebudgetdetail_PKC primary key (ConstructionCode,GroupCount,LineCount)
1283 271 h-you
) comment '??Z?\?Z????f?[?^????' ;
1284 198 h-you

1285 271 h-you
-- ??Z????f?[?^
1286 325 h-you
drop table if exists estimatedata cascade;
1287 198 h-you

1288
create table estimatedata (
1289 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1290
  , LineCount decimal(3,0) unsigned not null comment '?s???'
1291
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
1292
  , FixedItemCode varchar(1) comment '?????L?['
1293
  , ItemName varchar(120) comment '??????'
1294
  , SpecName varchar(120) comment '???^?i???E?`??E???@'
1295
  , PriceValue decimal(14,0) not null comment '???z'
1296
  , note varchar(60) comment '???l'
1297
  , MyExpensesFlg decimal(1,0) not null comment '????o??t???O'
1298
  , InputFlg decimal(1,0) not null comment '????t???O'
1299
  , EntryDate datetime not null comment '?o?^???t'
1300
  , UpdateDate datetime not null comment '?X?V???t'
1301 198 h-you
  , constraint estimatedata_PKC primary key (ConstructionCode,LineCount)
1302 271 h-you
) comment '??Z????f?[?^' ;
1303 198 h-you

1304
create index EstimateData_Index1
1305
  on estimatedata(ConstructionCode,FixedItemCode);
1306

1307 271 h-you
-- ??Z????y?[?W?f?[?^
1308 325 h-you
drop table if exists estimatedatabody cascade;
1309 198 h-you

1310
create table estimatedatabody (
1311 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1312
  , PageCount decimal(4,0) unsigned not null comment '?y?[?W???'
1313
  , Category decimal(1,0) not null comment '?y?[?W??'
1314
  , UnionComponentCode decimal(5,0) unsigned not null comment '?????\???L?['
1315
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
1316
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
1317
  , SelectComponent decimal(5,0) unsigned not null comment '?I???\???L?['
1318
  , PageTitle varchar(120) not null comment '?y?[?W?\????'
1319
  , DetailLineCount decimal(3,0) unsigned not null comment '????s???'
1320
  , EntryDate datetime not null comment '?o?^???t'
1321
  , UpdateDate datetime not null comment '?X?V???t'
1322 198 h-you
  , constraint estimatedatabody_PKC primary key (ConstructionCode,PageCount)
1323 271 h-you
) comment '??Z????y?[?W?f?[?^' ;
1324 198 h-you

1325
create index EstimateDataBody_Index1
1326
  on estimatedatabody(ConstructionCode,ComponentCode,ItemCode);
1327

1328 271 h-you
-- ??Z????f?[?^????
1329 325 h-you
drop table if exists estimatedatadetail cascade;
1330 198 h-you

1331
create table estimatedatadetail (
1332 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1333
  , PageCount decimal(4,0) unsigned not null comment '?y?[?W???'
1334
  , LineCount decimal(3,0) unsigned not null comment '?s???'
1335
  , DataType decimal(1,0) not null comment '?f?[?^???'
1336
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
1337
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
1338
  , SpecCode decimal(5,0) unsigned not null comment '???L?['
1339
  , ItemName varchar(120) comment '??????'
1340
  , SpecName varchar(120) comment '???^?i???E?`??E???@'
1341
  , Unitcount decimal(8,2) not null comment '????'
1342
  , UnitName varchar(30) comment '?P?????'
1343
  , UnitPrice decimal(9,2) not null comment '?P??'
1344
  , LineTotal decimal(12,0) not null comment '???z'
1345
  , note varchar(60) comment '???l'
1346
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
1347
  , MyExpensesFlg decimal(1,0) not null comment '????o??t???O'
1348
  , InputFlg decimal(1,0) comment '????t???O'
1349
  , EntryDate datetime not null comment '?o?^???t'
1350
  , UpdateDate datetime not null comment '?X?V???t'
1351 198 h-you
  , constraint estimatedatadetail_PKC primary key (ConstructionCode,PageCount,LineCount)
1352 271 h-you
) comment '??Z????f?[?^????' ;
1353 198 h-you

1354
create index EstimateDataDetail_Index1
1355
  on estimatedatadetail(ConstructionCode,PageCount);
1356

1357 271 h-you
-- ?o???}?X?^
1358 325 h-you
drop table if exists expensesmaster cascade;
1359 198 h-you

1360
create table expensesmaster (
1361 271 h-you
  DivisionCode smallint(6) not null comment '?H?????R?[?h'
1362
  , NameCode smallint(6) not null comment '?o????R?[?h'
1363
  , DisplayOrder smallint(6) not null comment '?\????'
1364
  , ExpensesRatio decimal(4,2) not null comment '?o??'
1365
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1366
  , EntryDate datetime not null comment '?o?^???t'
1367
  , UpdateDate datetime not null comment '?X?V???t'
1368 198 h-you
  , constraint expensesmaster_PKC primary key (DivisionCode,NameCode)
1369 271 h-you
) comment '?o???}?X?^' ;
1370 198 h-you

1371 271 h-you
-- ???x???}?X?^
1372 325 h-you
drop table if exists holidaycalendermaster cascade;
1373 198 h-you

1374
create table holidaycalendermaster (
1375 271 h-you
  Holiday date not null comment '?x??'
1376
  , BusinessYear smallint(5) unsigned not null comment '?c??N?x'
1377
  , TargetMonth tinyint(3) unsigned not null comment '?Y????'
1378
  , TargetDay tinyint(3) unsigned not null comment '?Y????'
1379 198 h-you
  , constraint holidaycalendermaster_PKC primary key (Holiday)
1380 271 h-you
) comment '???x???}?X?^' ;
1381 198 h-you

1382
create index HolidayCalender_Index1
1383
  on holidaycalendermaster(BusinessYear);
1384

1385
create index HolidayCalenderMaster_Index2
1386
  on holidaycalendermaster(TargetMonth);
1387

1388
create index HolidayCalenderMaster_Index3
1389
  on holidaycalendermaster(TargetDay);
1390

1391 271 h-you
-- ?????????????
1392 325 h-you
drop table if exists inputsearchlogdata cascade;
1393 198 h-you

1394
create table inputsearchlogdata (
1395 271 h-you
  ConstructionCode decimal(10,0) not null comment '?H???R?[?h'
1396
  , UsedProcessNo decimal(4,0) not null comment '?g?p?@?\???'
1397
  , DisplayOrder decimal(4,0) unsigned not null comment '?\????'
1398
  , DataType decimal(1,0) not null comment '?f?[?^???'
1399
  , InputCode decimal(10,0) comment '????R?[?h'
1400 198 h-you
  , constraint inputsearchlogdata_PKC primary key (ConstructionCode,UsedProcessNo,DisplayOrder)
1401 271 h-you
) comment '?????????????' ;
1402 198 h-you

1403
create index InputSearchLogData_Index1
1404
  on inputsearchlogdata(ConstructionCode,UsedProcessNo,InputCode);
1405

1406 271 h-you
-- ???????f?[?^
1407 325 h-you
drop table if exists invoicedata cascade;
1408 106 bit

1409
create table invoicedata (
1410 271 h-you
  INVOICENO decimal(9,0) not null comment '??????No'
1411
  , ORDERERSDIVISION decimal(5,0) not null comment '???????'
1412
  , ORDERERSCODE decimal(5,0) not null comment '??????R?[?h'
1413
  , REQUESTMONTH decimal(6,0) not null comment '??????'
1414
  , SEQNO decimal(2,0) not null comment '?A??'
1415
  , CRETATEDATE date not null comment '????'
1416
  , REQUESTDATE date not null comment '??????'
1417
  , REQUESTNAME varchar(120) comment '??????'
1418
  , TOTALAMOUNT decimal(10,0) comment '???????v???z'
1419
  , TAXAMOUNT decimal(10,0) comment '???????z'
1420
  , COMMENT1 varchar(60) comment '?R?????g1'
1421
  , COMMENT2 varchar(60) comment '?R?????g2'
1422
  , COMMENT3 varchar(60) not null comment '?R?????g3'
1423
  , COMMENT4 varchar(60) not null comment '?R?????g4'
1424
  , COMMENT5 varchar(60) not null comment '?R?????g5'
1425
  , COMPLETEFLG decimal(1,0) default '0' not null comment '?????t???O'
1426
  , ENTRYDATE datetime not null comment '?o?^?N????'
1427
  , UPDATEDATE datetime not null comment '?X?V?N????'
1428 106 bit
  , constraint invoicedata_PKC primary key (INVOICENO)
1429 271 h-you
) comment '???????f?[?^' ;
1430 106 bit

1431
alter table invoicedata add unique ORDERERSDIVISION (ORDERERSDIVISION,ORDERERSCODE,REQUESTMONTH,SEQNO) ;
1432

1433 271 h-you
-- ??????
1434 325 h-you
drop table if exists materialinfo cascade;
1435 106 bit

1436
create table materialinfo (
1437 271 h-you
  MATERIALITEMCODE smallint(5) unsigned default 0 not null comment '????i??R?[?h'
1438
  , MATERIALCOUNT smallint(5) unsigned comment '?????'
1439
  , RENTCOUNT smallint(5) unsigned comment '??o??\??'
1440
  , DELETEFLG smallint(5) unsigned comment '???t???O'
1441
  , ENTRYDATE datetime comment '?o?^???t'
1442
  , UPDATEDATE datetime comment '?X?V???t'
1443 106 bit
  , constraint materialinfo_PKC primary key (MATERIALITEMCODE)
1444 271 h-you
) comment '??????' ;
1445 106 bit

1446 271 h-you
-- ????i??}?X?^
1447 325 h-you
drop table if exists materialitemmaster cascade;
1448 106 bit

1449
create table materialitemmaster (
1450 271 h-you
  MATERIALITEMCODE smallint(5) unsigned default 0 not null comment '????i??R?[?h'
1451
  , MATERIALKINDCODE smallint(5) unsigned comment '??????R?[?h'
1452
  , MATERIALITEMNAME varchar(40) comment '????i?????'
1453
  , DISPLAYORDER smallint(5) unsigned comment '?\????'
1454
  , DELETEFLG tinyint(3) unsigned comment '???t???O'
1455
  , ENTRYDATE datetime comment '?o?^???t'
1456
  , UPDATEDATE datetime comment '?X?V???t'
1457
  , VERSIONNO decimal(8,0) default '0' not null comment '?o?[?W???????'
1458 106 bit
  , constraint materialitemmaster_PKC primary key (MATERIALITEMCODE)
1459 271 h-you
) comment '????i??}?X?^' ;
1460 106 bit

1461 271 h-you
-- ??????}?X?^
1462 325 h-you
drop table if exists materialkindmaster cascade;
1463 106 bit

1464
create table materialkindmaster (
1465 271 h-you
  MATERIALKINDCODE smallint(5) unsigned default 0 not null comment '??????R?[?h'
1466
  , MATERIALKINDNAME varchar(40) comment '?????????'
1467
  , DISPLAYORDER smallint(5) unsigned comment '?\????'
1468
  , DELETEFLG tinyint(3) unsigned comment '???t???O'
1469
  , ENTRYDATE datetime comment '?o?^???t'
1470
  , UPDATEDATE datetime comment '?X?V???t'
1471 106 bit
  , constraint materialkindmaster_PKC primary key (MATERIALKINDCODE)
1472 271 h-you
) comment '??????}?X?^' ;
1473 106 bit

1474 271 h-you
-- ??????????
1475 325 h-you
drop table if exists materialrecordinfo cascade;
1476 106 bit

1477
create table materialrecordinfo (
1478 271 h-you
  MATERIALITEMCODE smallint(5) unsigned default 0 not null comment '????i??R?[?h'
1479
  , PROCESSDATE date default '0000-00-00' not null comment '?????N????'
1480
  , SEQNO smallint(5) unsigned default 0 not null comment '?A??'
1481
  , RECKIND tinyint(3) unsigned comment '???R?[?h??'
1482
  , CONSTRUCTIONCODE int(10) unsigned comment '?H?????'
1483
  , PERSONCODE int(10) unsigned comment '?S????R?[?h'
1484
  , MATERIALCOUNT smallint(5) unsigned comment '?????'
1485
  , REPAYPLANDATE date comment '??p?\??N????'
1486
  , COMMENTTEXT varchar(80) comment '?R?????g'
1487
  , ENTRYDATE datetime comment '?o?^???t'
1488
  , UPDATEDATE datetime comment '?X?V???t'
1489 106 bit
  , constraint materialrecordinfo_PKC primary key (MATERIALITEMCODE,PROCESSDATE,SEQNO)
1490 271 h-you
) comment '??????????' ;
1491 106 bit

1492 271 h-you
-- ?f??????b?Z?[?W
1493 325 h-you
drop table if exists messageboarddata cascade;
1494 198 h-you

1495
create table messageboarddata (
1496 271 h-you
  RecordNumber decimal(6,0) unsigned not null comment '???R?[?h???'
1497
  , BranchNumber decimal(3,0) unsigned not null comment '???R?[?h?}??'
1498
  , FromCode decimal(8,0) unsigned not null comment '???????R?[?h'
1499
  , FromName varchar(60) not null comment '???????'
1500
  , MessageTitile varchar(100) comment '?`???^?C?g??'
1501
  , MessageContent varchar(1333) not null comment '?`?????e'
1502
  , LinkType decimal(2,0) not null comment '?????N????^?C?v'
1503
  , LinkMessage varchar(200) comment '?????N??????'
1504
  , LinkCode varchar(30) comment '?????N?L?['
1505
  , WritingDate datetime not null comment '?????????'
1506
  , PersonCode decimal(8,0) not null comment '??????S????R?[?h'
1507
  , ShareFlag decimal(2,0) not null comment '???????t???O'
1508
  , MessageColor varchar(8) comment '?????F'
1509
  , BackColor varchar(8) comment '?o?b?N?J???['
1510
  , MessageFlag decimal(1,0) not null comment '???b?Z?[?W?t???O'
1511
  , EntryDate datetime not null comment '?o?^???t'
1512
  , UpdateDate datetime not null comment '?X?V???t'
1513 198 h-you
  , constraint messageboarddata_PKC primary key (RecordNumber,BranchNumber)
1514 271 h-you
) comment '?f??????b?Z?[?W' ;
1515 198 h-you

1516
create index MessageBoardData_Index1
1517
  on messageboarddata(WritingDate);
1518

1519
create index MessageBoardData_Index2
1520
  on messageboarddata(MessageFlag);
1521

1522 271 h-you
-- ?f???????e?[?u??
1523 325 h-you
drop table if exists messageboardterget cascade;
1524 198 h-you

1525
create table messageboardterget (
1526 271 h-you
  RecordNumber decimal(6,0) unsigned not null comment '???R?[?h???'
1527
  , BranchNumber decimal(3,0) unsigned not null comment '???R?[?h?}??'
1528
  , SeqNum decimal(3,0) unsigned not null comment '????'
1529
  , ToCode decimal(8,0) not null comment '????R?[?h'
1530
  , ToName varchar(60) not null comment '????'
1531
  , EntryDate datetime not null comment '?o?^???t'
1532
  , UpdateDate datetime not null comment '?X?V???t'
1533 198 h-you
  , constraint messageboardterget_PKC primary key (RecordNumber,BranchNumber,SeqNum)
1534 271 h-you
) comment '?f???????e?[?u??' ;
1535 198 h-you

1536
create index MessageBoardTerget_Index1
1537
  on messageboardterget(RecordNumber,BranchNumber);
1538

1539 271 h-you
-- ?f??????b?Z?[?W?{??????
1540 325 h-you
drop table if exists messagebrowsinghistory cascade;
1541 198 h-you

1542
create table messagebrowsinghistory (
1543 271 h-you
  RecordNumber decimal(6,0) unsigned not null comment '???R?[?h???'
1544
  , BranchNumber decimal(3,0) unsigned not null comment '???R?[?h?}??'
1545
  , SeqNum decimal(3,0) unsigned not null comment '????'
1546
  , BrowsingCode decimal(8,0) not null comment '?{????R?[?h'
1547
  , BrowsingDate datetime not null comment '?{?????t'
1548
  , EntryDate datetime not null comment '?o?^???t'
1549
  , UpdateDate datetime not null comment '?X?V???t'
1550 198 h-you
  , constraint messagebrowsinghistory_PKC primary key (RecordNumber,BranchNumber,SeqNum)
1551 271 h-you
) comment '?f??????b?Z?[?W?{??????' ;
1552 198 h-you

1553 271 h-you
-- ???}?X?^
1554 325 h-you
drop table if exists monthmaster cascade;
1555 198 h-you

1556
create table monthmaster (
1557 271 h-you
  month smallint(6) not null comment '??'
1558 338 h-you
  , constraint monthmaster_PKC primary key (month)
1559 271 h-you
) comment '???}?X?^' ;
1560 198 h-you

1561 271 h-you
-- ??????}?X?^
1562 325 h-you
drop table if exists orderersmaster cascade;
1563 198 h-you

1564
create table orderersmaster (
1565 271 h-you
  OrderCotegory decimal(5,0) unsigned not null comment '???????'
1566
  , OrderersCode decimal(5,0) unsigned not null comment '??????R?[?h'
1567
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
1568
  , OrderFlg decimal(1,0) not null comment '?@?l?c??E??l?t???O'
1569
  , CorporateStatusName varchar(100) comment '?@?l?i????'
1570
  , CorporateStatusPoint decimal(1,0) comment '?@?l?i?????u'
1571
  , OrderersName1 varchar(60) not null comment '???????1'
1572
  , OrderersName2 varchar(60) comment '????????Q'
1573
  , DepartmentName varchar(60) comment '??????'
1574
  , ChargePersonName varchar(60) comment '?S?????'
1575
  , ZipCode varchar(8) comment '?X????'
1576
  , Address1 varchar(60) comment '?Z???P'
1577
  , Address2 varchar(60) comment '?Z??2'
1578
  , Address3 varchar(60) comment '?Z??3'
1579
  , PhoneNumber varchar(13) comment '?d?b???'
1580
  , FaxNumber varchar(13) comment 'FAX???'
1581
  , MailAddress varchar(257) comment '???[???A?h???X'
1582
  , Note varchar(300) comment '???l'
1583
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1584
  , EntryDate datetime not null comment '?o?^???t'
1585
  , UpdateDate datetime not null comment '?X?V???t'
1586 198 h-you
  , constraint orderersmaster_PKC primary key (OrderCotegory,OrderersCode)
1587 271 h-you
) comment '??????}?X?^' ;
1588 198 h-you

1589 271 h-you
-- ????z?f?[?^
1590 325 h-you
drop table if exists orderspricedata cascade;
1591 198 h-you

1592
create table orderspricedata (
1593 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1594
  , ChangeNo decimal(3,0) unsigned not null comment '??X???'
1595
  , ChangeDate date not null comment '??X??'
1596
  , ChangePersonCode decimal(8,0) unsigned not null comment '??X??R?[?h'
1597
  , ChangePersonName varchar(60) comment '??X???'
1598
  , BeforeValue decimal(14,0) not null comment '??X?O???????z'
1599
  , BeforeValueInTax decimal(14,0) not null comment '??X?O???????z'
1600
  , AfterValue decimal(14,0) not null comment '??X????????z'
1601
  , AfterValueInTax decimal(14,0) not null comment '??X????????z'
1602
  , ChangeComment varchar(200) comment '??X???R'
1603
  , EntryDate datetime not null comment '?o?^???t'
1604
  , UpdateDate datetime not null comment '?X?V???t'
1605 198 h-you
  , constraint orderspricedata_PKC primary key (ConstructionCode,ChangeNo)
1606 271 h-you
) comment '????z?f?[?^' ;
1607 198 h-you

1608 271 h-you
-- ?x?????F???f?[?^
1609 325 h-you
drop table if exists paymentapprovalinfo cascade;
1610 106 bit

1611
create table paymentapprovalinfo (
1612 271 h-you
  COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h'
1613
  , TARGETDATE decimal(6,0) default '0' not null comment '???N??'
1614
  , SEQNO decimal(3,0) default '0' not null comment '?A??'
1615
  , LINECOUNT decimal(3,0) default '0' not null comment '?s???'
1616
  , APPROVALNO decimal(3,0) default '0' not null comment '???F????'
1617
  , APPROVALPERSON decimal(8,0) comment '???F??R?[?h'
1618
  , APPROVALPERSONNAME varchar(20) comment '???F???'
1619
  , APPROVALAUTHORITY decimal(1,0) comment '???F??????'
1620
  , APPROVALDATE date comment '???F???t'
1621
  , ENTRYDATE datetime comment '?o?^???t'
1622
  , UPDATEDATE datetime comment '?X?V???t'
1623 106 bit
  , constraint paymentapprovalinfo_PKC primary key (COMPANYCODE,TARGETDATE,SEQNO,LINECOUNT,APPROVALNO)
1624 271 h-you
) comment '?x?????F???f?[?^' ;
1625 106 bit

1626 271 h-you
-- ?x??????f?[?^
1627 325 h-you
drop table if exists paymentdatadetail cascade;
1628 106 bit

1629
create table paymentdatadetail (
1630 271 h-you
  COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h'
1631
  , TARGETDATE decimal(6,0) default '0' not null comment '???N??'
1632
  , SEQNO decimal(3,0) default '0' not null comment '?A??'
1633
  , LINECOUNT decimal(3,0) default '0' not null comment '?s???'
1634
  , BILLPRICE decimal(10,0) comment '???????z'
1635
  , DISCOUNTPRICE decimal(10,0) comment '?l???????z'
1636
  , OFFSETPRICE decimal(10,0) comment '???E???z'
1637
  , NEXTCOPRICE decimal(10,0) comment '????J?z'
1638
  , HIGHWPRICE decimal(10,0) comment '??????'
1639
  , HARDWPRICE decimal(10,0) comment '??????'
1640
  , INDSWASTETAX decimal(10,0) comment '?Y?p??'
1641
  , CNSTRPRICE decimal(10,0) comment '?????'
1642
  , CNSTRPRICEEXIST decimal(1,0) comment '??????L??'
1643
  , APPROVALPERSONCODE decimal(8,0) comment '???F?S????R?[?h'
1644
  , APPROVALDATE date comment '?S??????F???t'
1645
  , APPROVALENDFLG decimal(1,0) comment '???F?????t???O'
1646
  , ENTRYDATE datetime comment '?o?^???t'
1647
  , UPDATEDATE datetime comment '?X?V???t'
1648 106 bit
  , constraint paymentdatadetail_PKC primary key (COMPANYCODE,TARGETDATE,SEQNO,LINECOUNT)
1649 271 h-you
) comment '?x??????f?[?^' ;
1650 106 bit

1651 322 h-you
create index PayDataDetail_Index1
1652
  on paymentdatadetail(TARGETDATE);
1653

1654
create index PayDataDetail_Index2
1655
  on paymentdatadetail(APPROVALPERSONCODE);
1656

1657 302 h-you
-- ?H??????????f?[?^
1658 325 h-you
drop table if exists periodavoidance cascade;
1659 302 h-you

1660
create table periodavoidance (
1661
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1662
  , ConstructionStatusFlg decimal(2,0) not null comment '?H?????t???O'
1663
  , FieldNo decimal(2,0) not null comment '?`?F?b?N???t?B?[???h???'
1664
  , EntryDate datetime not null comment '?o?^???t'
1665
  , UpdateDate datetime not null comment '?X?V???t'
1666
  , constraint periodavoidance_PKC primary key (ConstructionCode,ConstructionStatusFlg,FieldNo)
1667
) comment '?H??????????f?[?^' ;
1668

1669
create index PeriodAvoidance_Index1
1670
  on periodavoidance(ConstructionCode);
1671

1672
create index PeriodAvoidance_Index2
1673
  on periodavoidance(ConstructionStatusFlg);
1674

1675
create index PeriodAvoidance_Index3
1676
  on periodavoidance(FieldNo);
1677

1678 271 h-you
-- ?S??????F?f?[?^
1679 325 h-you
drop table if exists personapproval cascade;
1680 198 h-you

1681
create table personapproval (
1682 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
1683
  , ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???'
1684
  , OrderDate date not null comment '??t??'
1685
  , OrderNo decimal(2,0) unsigned not null comment '??t???'
1686
  , SeqNo decimal(2,0) not null comment '?}??'
1687
  , PersonCodeApproval decimal(8,0) unsigned not null comment '?\???E???F??R?[?h'
1688
  , PetitionApprovalDate datetime not null comment '?\???E???F???t'
1689
  , ApprovalLimitDates datetime not null comment '???F??]??'
1690
  , ApprovalStatus decimal(1,0) not null comment '???F???'
1691
  , InputComment varchar(300) comment '?R?????g'
1692
  , EntryDate datetime not null comment '?o?^???t'
1693
  , UpdateDate datetime not null comment '?X?V???t'
1694 198 h-you
  , constraint personapproval_PKC primary key (PersonCode,ApprovalCode,OrderDate,OrderNo,SeqNo)
1695 271 h-you
) comment '?S??????F?f?[?^' ;
1696 198 h-you

1697 271 h-you
-- ?S??????F?R?????g?f?[?^
1698 325 h-you
drop table if exists personapprovalcomment cascade;
1699 198 h-you

1700
create table personapprovalcomment (
1701 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
1702
  , ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???'
1703
  , OrderDate date not null comment '??t??'
1704
  , OrderNo decimal(2,0) unsigned not null comment '??t???'
1705
  , CommentNo decimal(2,0) not null comment '?R?????g???'
1706
  , ParentNo decimal(2,0) not null comment '?e?R?????g???'
1707
  , ApproValComment varchar(300) comment '?w???E?A???R?????g'
1708
  , EntryDate datetime not null comment '?o?^???t'
1709
  , UpdateDate datetime not null comment '?X?V???t'
1710 198 h-you
  , constraint personapprovalcomment_PKC primary key (PersonCode,ApprovalCode,OrderDate,OrderNo,CommentNo)
1711 271 h-you
) comment '?S??????F?R?????g?f?[?^' ;
1712 198 h-you

1713 271 h-you
-- ?S??????????}?X?^
1714 325 h-you
drop table if exists persondepartmentmaster cascade;
1715 198 h-you

1716
create table persondepartmentmaster (
1717 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
1718
  , DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
1719
  , AffiliationFlg decimal(1,0) not null comment '?????t???O'
1720
  , EntryDate datetime not null comment '?o?^???t'
1721
  , UpdateDate datetime not null comment '?X?V???t'
1722 198 h-you
  , constraint persondepartmentmaster_PKC primary key (PersonCode,DepartmentCode)
1723 271 h-you
) comment '?S??????????}?X?^' ;
1724 198 h-you

1725
create index PersonDepartmentMaster_Index1
1726
  on persondepartmentmaster(PersonCode);
1727

1728
create index PersonDepartmentMaster_Index2
1729
  on persondepartmentmaster(DepartmentCode);
1730

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

1734
create table personinchargemaster (
1735 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
1736
  , DisplayOrder decimal(8,0) unsigned not null comment '?\????'
1737
  , PersonName varchar(60) not null comment '?S?????'
1738
  , StartDate date not null comment '?g?p?J?n?N????'
1739
  , EndDate date comment '?g?p?I???N????'
1740
  , PassWord varchar(16) comment '?p?X???[?h'
1741
  , SecurityManagement decimal(1,0) not null comment '?@????'
1742
  , SecCode decimal(2,0) unsigned not null comment '???????'
1743
  , MsgBackColor varchar(8) comment '???b?Z?[?W?w?i?F'
1744
  , DisplayString varchar(20) comment '?\???E???????'
1745
  , DepartmentCode decimal(5,0) unsigned comment '?????R?[?h'
1746
  , MonthlySalary decimal(11,0) not null comment '???????z'
1747
  , YearSalary decimal(12,0) not null comment '?N????z'
1748
  , Qualification varchar(120) comment '???i?????'
1749
  , SealPrintName varchar(5) comment '???\????'
1750
  , EmployeeClassFlg decimal(1,0) not null comment '?????'
1751
  , LedgerFlg decimal(1,0) not null comment '???v?Z???t???O'
1752
  , CommutingDistance decimal(5,2) not null comment '??????'
1753
  , CommuteCosts decimal(5,0) not null comment '??????'
1754
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1755
  , EntryDate datetime not null comment '?o?^???t'
1756
  , UpdateDate datetime not null comment '?X?V???t'
1757 198 h-you
  , constraint personinchargemaster_PKC primary key (PersonCode)
1758 271 h-you
) comment '?S????}?X?^' ;
1759 198 h-you

1760
create index PersonInChargeMaster_Index1
1761
  on personinchargemaster(StartDate);
1762

1763
create index PersonInChargeMaster_Index2
1764
  on personinchargemaster(DepartmentCode);
1765

1766 271 h-you
-- ?S??????^?}?X?^
1767 325 h-you
drop table if exists personsalarymaster cascade;
1768 198 h-you

1769
create table personsalarymaster (
1770 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
1771
  , StartDate date not null comment '?g?p?J?n?N????'
1772
  , MonthlySalary decimal(11,0) not null comment '???????z'
1773
  , YearSalary decimal(12,0) not null comment '?N????z'
1774
  , EntryDate datetime not null comment '?o?^???t'
1775
  , UpdateDate datetime not null comment '?X?V???t'
1776 198 h-you
  , constraint personsalarymaster_PKC primary key (PersonCode,StartDate)
1777 271 h-you
) comment '?S??????^?}?X?^' ;
1778 198 h-you

1779
create index PersonSalaryMaster_Index1
1780
  on personsalarymaster(PersonCode);
1781

1782
create index PersonSalaryMaster_Index2
1783
  on personsalarymaster(StartDate);
1784

1785 342 h-you
create index PersonSalaryMaster_Index3
1786
  on personsalarymaster(MonthlySalary);
1787

1788 271 h-you
-- ?w???????f?[?^
1789 325 h-you
drop table if exists pointingoutcomment cascade;
1790 198 h-you

1791
create table pointingoutcomment (
1792 271 h-you
  ConstructionCode decimal(10,0) not null comment '?H???R?[?h'
1793
  , ProcessNo smallint(6) not null comment '????????i??????j'
1794
  , SeqNo smallint(6) not null comment '????'
1795
  , PageCount smallint(6) not null comment '?y?[?W???'
1796
  , PersonCode decimal(8,0) not null comment '?L????R?[?h'
1797
  , DrowColor varchar(8) comment '?`??F'
1798
  , CommentMessage varchar(1000) comment '???b?Z?[?W'
1799
  , StartPointX smallint(6) not null comment '?w?E?????u?w'
1800
  , StartPointY smallint(6) not null comment '?w?E?????u?x'
1801
  , CurrentPointX smallint(6) not null comment '??????u?w'
1802
  , CurrentPointY smallint(6) not null comment '??????u?x'
1803
  , CurrentWidth smallint(6) not null comment '?\???T?C?YWidth'
1804
  , CurrentHeight smallint(6) not null comment '?\???T?C?YHeigth'
1805
  , EntryDate datetime not null comment '?o?^???t'
1806
  , UpdateDate datetime not null comment '?X?V???t'
1807 198 h-you
  , constraint pointingoutcomment_PKC primary key (ConstructionCode,ProcessNo,SeqNo)
1808 271 h-you
) comment '?w???????f?[?^' ;
1809 198 h-you

1810 271 h-you
-- ?????????????c???^?f?[?^
1811 325 h-you
drop table if exists proceedingsdata cascade;
1812 198 h-you

1813
create table proceedingsdata (
1814 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1815
  , ProceedingsDataDate date not null comment '?c???^????'
1816
  , StartMeetingTime decimal(4,0) unsigned not null comment '??c????J?n'
1817
  , EndMeetingTime decimal(4,0) unsigned not null comment '??c????I??'
1818
  , CreatorCode decimal(8,0) not null comment '????R?[?h'
1819
  , PalceFlag decimal(1,0) not null comment '???n?t???O'
1820
  , MeetingPalce varchar(120) comment '???????'
1821
  , EntryDate datetime not null comment '?o?^???t'
1822
  , UpdateDate datetime not null comment '?X?V???t'
1823 198 h-you
  , constraint proceedingsdata_PKC primary key (ConstructionCode,ProceedingsDataDate,StartMeetingTime)
1824 271 h-you
) comment '?????????????c???^?f?[?^' ;
1825 198 h-you

1826 271 h-you
-- ?????????????c???^?f?[?^?i?o???j
1827 325 h-you
drop table if exists proceedingsdataattend cascade;
1828 198 h-you

1829
create table proceedingsdataattend (
1830 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1831
  , ProceedingsDataDate date not null comment '?c???^????'
1832
  , StartMeetingTime decimal(4,0) unsigned not null comment '??c????J?n'
1833
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
1834
  , Department varchar(20) comment '?o??????'
1835
  , AttendName varchar(10) comment '?o??????'
1836
  , EntryDate datetime not null comment '?o?^???t'
1837
  , UpdateDate datetime not null comment '?X?V???t'
1838 198 h-you
  , constraint proceedingsdataattend_PKC primary key (ConstructionCode,ProceedingsDataDate,StartMeetingTime,SeqNo)
1839 271 h-you
) comment '?????????????c???^?f?[?^?i?o???j' ;
1840 198 h-you

1841 271 h-you
-- ?????????????c???^?f?[?^?i????j
1842 325 h-you
drop table if exists proceedingsdatadetail cascade;
1843 198 h-you

1844
create table proceedingsdatadetail (
1845 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1846
  , ProceedingsDataDate date not null comment '?c???^????'
1847
  , StartMeetingTime decimal(4,0) unsigned not null comment '??c????J?n'
1848
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
1849
  , TitleNo varchar(5) comment '?c????'
1850
  , Title varchar(20) comment '?c??'
1851
  , ContentsText varchar(50) comment '???e'
1852
  , EntryDate datetime not null comment '?o?^???t'
1853
  , UpdateDate datetime not null comment '?X?V???t'
1854 198 h-you
  , constraint proceedingsdatadetail_PKC primary key (ConstructionCode,ProceedingsDataDate,StartMeetingTime,SeqNo)
1855 271 h-you
) comment '?????????????c???^?f?[?^?i????j' ;
1856 198 h-you

1857 271 h-you
-- ???F?f?[?^
1858 325 h-you
drop table if exists processapproval cascade;
1859 198 h-you

1860
create table processapproval (
1861 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1862
  , ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???'
1863
  , OrderNo decimal(2,0) unsigned not null comment '??t???'
1864
  , SeqNo decimal(2,0) not null comment '?}??'
1865
  , PersonCode decimal(8,0) unsigned not null comment '?\???E???F??R?[?h'
1866
  , PetitionApprovalDate datetime not null comment '?\???E???F???t'
1867
  , ApprovalLimitDates datetime not null comment '???F??]??'
1868
  , ApprovalStatus decimal(1,0) not null comment '???F???'
1869
  , InputComment varchar(300) comment '?R?????g'
1870
  , EntryDate datetime not null comment '?o?^???t'
1871
  , UpdateDate datetime not null comment '?X?V???t'
1872 198 h-you
  , constraint processapproval_PKC primary key (ConstructionCode,ApprovalCode,OrderNo,SeqNo)
1873 271 h-you
) comment '???F?f?[?^' ;
1874 198 h-you

1875 271 h-you
-- ???F?R?????g?f?[?^
1876 325 h-you
drop table if exists processapprovalcomment cascade;
1877 198 h-you

1878
create table processapprovalcomment (
1879 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1880
  , ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???'
1881
  , OrderNo decimal(2,0) unsigned not null comment '??t???'
1882
  , CommentNo decimal(2,0) not null comment '?R?????g???'
1883
  , ParentNo decimal(2,0) not null comment '?e?R?????g???'
1884
  , ApproValComment varchar(300) comment '?w???E?A???R?????g'
1885
  , EntryDate datetime not null comment '?o?^???t'
1886
  , UpdateDate datetime not null comment '?X?V???t'
1887 198 h-you
  , constraint processapprovalcomment_PKC primary key (ConstructionCode,ApprovalCode,OrderNo,CommentNo)
1888 271 h-you
) comment '???F?R?????g?f?[?^' ;
1889 198 h-you

1890 271 h-you
-- ???F????f?[?^
1891 325 h-you
drop table if exists processapprovaldetail cascade;
1892 198 h-you

1893
create table processapprovaldetail (
1894 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1895
  , ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???'
1896
  , OrderNo decimal(2,0) unsigned not null comment '??t???'
1897
  , SerialNo decimal(2,0) unsigned not null comment '?}??'
1898
  , LinkCode decimal(10,0) not null comment '?????N???'
1899
  , EntryDate datetime not null comment '?o?^???t'
1900
  , UpdateDate datetime not null comment '?X?V???t'
1901 198 h-you
  , constraint processapprovaldetail_PKC primary key (ConstructionCode,ApprovalCode,OrderNo,SerialNo)
1902 271 h-you
) comment '???F????f?[?^' ;
1903 198 h-you

1904 271 h-you
-- ?N?????}?X?^
1905 325 h-you
drop table if exists processexcutemaster cascade;
1906 198 h-you

1907
create table processexcutemaster (
1908 271 h-you
  SecCode decimal(2,0) unsigned not null comment '???????'
1909
  , ExecCode decimal(4,0) unsigned not null comment '?N?????????'
1910
  , EditFlg decimal(1,0) not null comment '??W?t???O'
1911
  , EntryDate datetime not null comment '?o?^???t'
1912
  , UpdateDate datetime not null comment '?X?V???t'
1913 198 h-you
  , constraint processexcutemaster_PKC primary key (SecCode,ExecCode)
1914 271 h-you
) comment '?N?????}?X?^' ;
1915 198 h-you

1916
create index ProcessExcuteMaster_Index1
1917
  on processexcutemaster(SecCode);
1918

1919
create index ProcessExcuteMaster_Index2
1920
  on processexcutemaster(ExecCode);
1921

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

1925
create table purchaseorder (
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
  , CreateDate date comment '?????t'
1930
  , OrderPrice decimal(12,0) not null comment '???????z'
1931
  , LastRowStringDate date not null comment '??I?s?\?????t'
1932
  , OrderSheetType decimal(1,0) not null comment '???E?{???t???O'
1933
  , PaymentTerms decimal(1,0) not null comment '?x????????'
1934
  , CashRatio decimal(4,1) not null comment '?????????i???j'
1935
  , BillPeriod decimal(4,0) not null comment '??`????'
1936
  , PrePayments decimal(1,0) not null comment '?O????'
1937
  , PrePaymentsDays decimal(3,0) not null comment '?O????????'
1938
  , PrePaymentsPrice decimal(12,0) not null comment '?O???????z'
1939
  , PartialPayment decimal(1,0) not null comment '??????'
1940
  , PartialPaymentMounth decimal(2,0) unsigned not null comment '???????????'
1941
  , PartialPaymentDay1 decimal(2,0) unsigned not null comment '???????????'
1942
  , PartialPaymentDay2 decimal(2,0) unsigned not null comment '???????x????'
1943
  , PartialPaymentPrice decimal(12,0) not null comment '?????????z'
1944
  , CompletionPayment decimal(1,0) not null comment '???n??????x??'
1945
  , CompletionPaymentDays decimal(3,0) unsigned not null comment '???n??????x??????'
1946
  , CompletionPaymentPrice decimal(12,0) not null comment '???n??????x?????z'
1947
  , LeadEngineerCode decimal(8,0) comment '??C?Z?p??R?[?h'
1948 277 h-you
  , LeadEngineerName varchar(60) comment '??C?Z?p???'
1949 271 h-you
  , SafetyOfficerCode decimal(8,0) comment '???S?????R?[?h'
1950
  , SafetyOfficerName varchar(60) comment '???S??????'
1951
  , WorkersCount decimal(3,0) unsigned comment '??????'
1952
  , PrintoutDate date not null comment '????N????'
1953
  , EntryDate datetime not null comment '?o?^???t'
1954
  , UpdateDate datetime not null comment '?X?V???t'
1955 198 h-you
  , constraint purchaseorder_PKC primary key (ConstructionCode,SeqNo)
1956 271 h-you
) comment '???????f?[?^' ;
1957 198 h-you

1958 271 h-you
-- ?????????t?f?[?^
1959 325 h-you
drop table if exists purchaseorderdate cascade;
1960 198 h-you

1961
create table purchaseorderdate (
1962 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1963
  , SeqNo decimal(3,0) unsigned not null comment '???????}??'
1964
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
1965
  , SendDate date not null comment '???????X????'
1966
  , ReturnDate date not null comment '???????????'
1967
  , ReturnCheckDate date not null comment '??????????m?F??'
1968
  , EntryDate datetime not null comment '?o?^???t'
1969
  , UpdateDate datetime not null comment '?X?V???t'
1970 198 h-you
  , constraint purchaseorderdate_PKC primary key (ConstructionCode,SeqNo)
1971 271 h-you
) comment '?????????t?f?[?^' ;
1972 198 h-you

1973 271 h-you
-- ??????????f?[?^
1974 325 h-you
drop table if exists purchaseorderdetail cascade;
1975 198 h-you

1976
create table purchaseorderdetail (
1977 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1978
  , SeqNo decimal(3,0) unsigned not null comment '???????}??'
1979
  , GroupCount decimal(1,0) not null comment '?O???[?v???'
1980
  , LineCount decimal(3,0) unsigned not null comment '?s???'
1981
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
1982
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
1983
  , FirstString varchar(120) comment '?H??E?i??'
1984
  , SecondString varchar(120) comment '???e????'
1985
  , UnitCount decimal(8,2) not null comment '????'
1986
  , UnitName varchar(30) comment '?P??'
1987
  , UnitPrice decimal(10,0) not null comment '?P??'
1988
  , OrdersLinePrice decimal(12,0) comment '???z'
1989 302 h-you
  , SourceCode decimal(10,0) unsigned not null comment '???H?????'
1990
  , SourceDetailCnt decimal(4,0) unsigned not null comment '????????'
1991
  , DataTypeFlag decimal(1,0) unsigned not null comment '?f?[?^?^?C?v?t???O'
1992 357 h-you
  , StatutoryWelfareRate decimal(4,2) not null comment '?@???????'
1993 271 h-you
  , EntryDate datetime not null comment '?o?^???t'
1994
  , UpdateDate datetime not null comment '?X?V???t'
1995 198 h-you
  , constraint purchaseorderdetail_PKC primary key (ConstructionCode,SeqNo,GroupCount,LineCount)
1996 271 h-you
) comment '??????????f?[?^' ;
1997 198 h-you

1998
create index POrderDetail_Index1
1999
  on purchaseorderdetail(SourceCode);
2000

2001 271 h-you
-- ?????f?[?^
2002 325 h-you
drop table if exists requestdata cascade;
2003 106 bit

2004
create table requestdata (
2005 271 h-you
  REQUESTNO decimal(9,0) not null comment '????No'
2006
  , MAINCONSTRUCTIONCODE decimal(10,0) not null comment '?{?H?????'
2007
  , CONSTRUCTIONNAME varchar(120) not null comment '?H??????'
2008
  , CONTRACTAMOUNT decimal(10,0) not null comment '???????z'
2009
  , PAIDAMOUNT decimal(10,0) not null comment '????????z'
2010
  , REQUESTAMOUNT0 decimal(10,0) not null comment '???????z?O'
2011
  , REQUESTAMOUNT1 decimal(10,0) not null comment '???????z?P'
2012
  , REQUESTAMOUNT2 decimal(10,0) comment '???????z?Q'
2013
  , REQUESTAMOUNT3 decimal(10,0) comment '???????z?R'
2014
  , REQUESTAMOUNT4 decimal(10,0) comment '???????z?S'
2015
  , REQUESTAMOUNT5 decimal(10,0) comment '???????z?T'
2016
  , REQUESTAMOUNT6 decimal(10,0) comment '???????z?U'
2017
  , UNCLAIMEDAMOUNT decimal(10,0) not null comment '?????c???z'
2018
  , UNPAIDAMOUNT decimal(10,0) not null comment '?????????z'
2019
  , TAXAMOUNT decimal(10,0) not null comment '?????'
2020
  , NOTE varchar(120) not null comment '???l'
2021
  , ENTRYDATE datetime not null comment '?o?^?N????'
2022
  , UPDATEDATE datetime not null comment '?X?V?N????'
2023 106 bit
  , constraint requestdata_PKC primary key (REQUESTNO,MAINCONSTRUCTIONCODE)
2024 271 h-you
) comment '?????f?[?^' ;
2025 106 bit

2026 271 h-you
-- ?????f?[?^????
2027 325 h-you
drop table if exists requestdatadetail cascade;
2028 106 bit

2029
create table requestdatadetail (
2030 271 h-you
  REQUESTNO decimal(9,0) not null comment '????No'
2031
  , MAINCONSTRUCTIONCODE decimal(10,0) not null comment '?{?H?????'
2032
  , CONSTRUCTIONCODE decimal(10,0) not null comment '?H?????'
2033
  , CONSTRUCTIONKIND decimal(1,0) not null comment '?H????'
2034
  , REQUESTAMOUNT decimal(10,0) not null comment '???????z'
2035
  , TAXAMOUNT decimal(10,0) not null comment '?????'
2036
  , ENTRYDATE datetime not null comment '?o?^?N????'
2037
  , UPDATEDATE datetime not null comment '?X?V?N????'
2038 106 bit
  , constraint requestdatadetail_PKC primary key (REQUESTNO,MAINCONSTRUCTIONCODE,CONSTRUCTIONCODE,CONSTRUCTIONKIND)
2039 271 h-you
) comment '?????f?[?^????' ;
2040 106 bit

2041 271 h-you
-- ?????w?b?_
2042 325 h-you
drop table if exists requesthead cascade;
2043 106 bit

2044
create table requesthead (
2045 271 h-you
  REQUESTNO decimal(9,0) not null comment '????No'
2046
  , REQCONSTRUCTIONCODE decimal(10,0) not null comment '?????H?????'
2047
  , ORDERNO decimal(2,0) not null comment '??t???'
2048
  , REQUESTMONTH decimal(6,0) not null comment '??????'
2049
  , ORDERERSDIVISION decimal(5,0) not null comment '???????'
2050
  , ORDERERSCODE decimal(5,0) not null comment '??????R?[?h'
2051
  , ORDERERSNAME varchar(120) not null comment '???????'
2052
  , REQCONSTRUCTIONNAME varchar(120) not null comment '?????H??????'
2053
  , REQUESTTOTALAMOUNT decimal(10,0) not null comment '???????z???v'
2054
  , REQUESTAMOUNT decimal(10,0) not null comment '???????z'
2055
  , TAXAMOUNT decimal(10,0) not null comment '?????'
2056
  , UNPAIDAMOUNT decimal(10,0) comment '??????'
2057
  , NOTE varchar(120) comment '???l'
2058
  , ASSIGNEDFLG decimal(1,0) comment '??????t???O'
2059
  , INVOICENO decimal(9,0) not null comment '??????No'
2060
  , ENTRYDATE datetime not null comment '?o?^?N????'
2061
  , UPDATEDATE datetime not null comment '?X?V?N????'
2062 106 bit
  , constraint requesthead_PKC primary key (REQUESTNO)
2063 271 h-you
) comment '?????w?b?_' ;
2064 106 bit

2065
alter table requesthead add unique REQCONSTRUCTIONCODE (REQCONSTRUCTIONCODE,ORDERNO) ;
2066

2067 271 h-you
-- ?????????t?f?[?^
2068 325 h-you
drop table if exists requestorderdate cascade;
2069 106 bit

2070 198 h-you
create table requestorderdate (
2071 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2072
  , InvoiceNo decimal(9,0) not null comment '??????No'
2073
  , SendDate date not null comment '???????????X????'
2074
  , EntryDate datetime not null comment '?o?^???t'
2075
  , UpdateDate datetime not null comment '?X?V???t'
2076 239 h-you
  , constraint requestorderdate_PKC primary key (ConstructionCode,InvoiceNo)
2077 271 h-you
) comment '?????????t?f?[?^' ;
2078 109 bit

2079 271 h-you
-- ????O???t?f?[?^
2080 325 h-you
drop table if exists salesgraphdata cascade;
2081 198 h-you

2082
create table salesgraphdata (
2083 271 h-you
  GraphDataCode decimal(8,0) not null comment '?O???t?f?[?^?R?[?h'
2084
  , ConstructionPeriod decimal(4,0) unsigned not null comment '?????'
2085
  , SalesDataDays date not null comment '????N??'
2086
  , DisplayOrder decimal(8,0) unsigned not null comment '?\????'
2087
  , DataName varchar(100) not null comment '?f?[?^?\??????'
2088
  , SalesAmount decimal(10,0) not null comment '????f?[?^'
2089
  , AdministrativeExpense decimal(10,0) not null comment '???E?????o??'
2090
  , GrossProfit decimal(10,0) not null comment '?e???v'
2091
  , NetIncome decimal(10,0) not null comment '?????v(???v)'
2092
  , EntryDate datetime not null comment '?o?^???t'
2093
  , UpdateDate datetime not null comment '?X?V???t'
2094 198 h-you
  , constraint salesgraphdata_PKC primary key (GraphDataCode,ConstructionPeriod,SalesDataDays)
2095 271 h-you
) comment '????O???t?f?[?^' ;
2096 198 h-you

2097
create index SalesGraphData_Idx1
2098
  on salesgraphdata(DisplayOrder);
2099

2100
create index SalesGraphData_idx2
2101
  on salesgraphdata(ConstructionPeriod);
2102

2103 271 h-you
-- ?????}?X?^
2104 325 h-you
drop table if exists securitymaster cascade;
2105 198 h-you

2106
create table securitymaster (
2107 271 h-you
  SecCode decimal(2,0) unsigned not null comment '???????'
2108
  , DisplayOrder decimal(2,0) not null comment '?\????'
2109
  , SecName varchar(60) not null comment '????????'
2110
  , SecRank decimal(1,0) not null comment '?????????N'
2111
  , SecRange decimal(1,0) not null comment '???????'
2112
  , GeneralAffairs decimal(1,0) not null comment '????????t???O'
2113
  , SelectBackColor varchar(8) not null comment '?I??w?i?F'
2114
  , EntryDate datetime not null comment '?o?^???t'
2115
  , UpdateDate datetime not null comment '?X?V???t'
2116 198 h-you
  , constraint securitymaster_PKC primary key (SecCode)
2117 271 h-you
) comment '?????}?X?^' ;
2118 198 h-you

2119
create index SecurityMaster_Index1
2120
  on securitymaster(DisplayOrder);
2121

2122
create index SecurityMaster_Index2
2123
  on securitymaster(SecRank);
2124

2125
create index SecurityMaster_Index3
2126
  on securitymaster(SecRange);
2127

2128 271 h-you
-- ???S?p?g???[???f?[?^
2129 325 h-you
drop table if exists sfpdata cascade;
2130 239 h-you

2131
create table sfpdata (
2132 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2133
  , DataCount decimal(2,0) unsigned not null comment '?p?g???[????'
2134
  , RequestDate datetime not null comment '?p?g???[???v??????'
2135
  , PersonCode decimal(8,0) unsigned not null comment '?\????R?[?h'
2136
  , StringValue varchar(300) comment '?R?????g'
2137
  , OrderNo decimal(2,0) unsigned not null comment '?\????t???'
2138
  , EntryDate datetime not null comment '?o?^???t'
2139
  , UpdateDate datetime not null comment '?X?V???t'
2140 239 h-you
  , constraint sfpdata_PKC primary key (ConstructionCode,DataCount)
2141 271 h-you
) comment '???S?p?g???[???f?[?^' ;
2142 239 h-you

2143
create index SFPData_Index1
2144
  on sfpdata(RequestDate);
2145

2146 271 h-you
-- ???S?p?g???[??????f?[?^
2147 325 h-you
drop table if exists sfpdatadetail cascade;
2148 239 h-you

2149
create table sfpdatadetail (
2150 271 h-you
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2151
  , DataCount decimal(2,0) unsigned not null comment '?p?g???[????'
2152
  , SeqNo decimal(2,0) unsigned not null comment '?f?[?^?}??'
2153
  , CompanyCode decimal(8,0) unsigned not null comment '??????R?[?h'
2154
  , EntryDate datetime not null comment '?o?^???t'
2155
  , UpdateDate datetime not null comment '?X?V???t'
2156 239 h-you
  , constraint sfpdatadetail_PKC primary key (ConstructionCode,DataCount,SeqNo)
2157 271 h-you
) comment '???S?p?g???[??????f?[?^' ;
2158 239 h-you

2159 271 h-you
-- ??????{?H?H??o?^?\???f?[?^
2160 325 h-you
drop table if exists subconstrjobitemregist cascade;
2161 198 h-you

2162
create table subconstrjobitemregist (
2163 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '?\??????'
2164
  , CreateDate date not null comment '????'
2165
  , SeqNo decimal(2,0) unsigned not null comment '?\???A??'
2166
  , DisplayOrder decimal(8,0) unsigned not null comment '?\????'
2167
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
2168
  , EntryDate datetime not null comment '?o?^???t'
2169
  , UpdateDate datetime not null comment '?X?V???t'
2170 198 h-you
  , constraint subconstrjobitemregist_PKC primary key (PersonCode,CreateDate,SeqNo,DisplayOrder)
2171 271 h-you
) comment '??????{?H?H??o?^?\???f?[?^' ;
2172 198 h-you

2173 271 h-you
-- ??????E?????N?o?^?\???f?[?^
2174 325 h-you
drop table if exists subconstrjoblinkregist cascade;
2175 198 h-you

2176
create table subconstrjoblinkregist (
2177 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '?\??????'
2178
  , CreateDate date not null comment '????'
2179
  , SeqNo decimal(2,0) unsigned not null comment '?\???A??'
2180
  , DisplayOrder decimal(8,0) unsigned not null comment '?\????'
2181
  , JobCategoryCode decimal(5,0) not null comment '?E??L?['
2182
  , EntryDate datetime not null comment '?o?^???t'
2183
  , UpdateDate datetime not null comment '?X?V???t'
2184 198 h-you
  , constraint subconstrjoblinkregist_PKC primary key (PersonCode,CreateDate,SeqNo,DisplayOrder)
2185 271 h-you
) comment '??????E?????N?o?^?\???f?[?^' ;
2186 198 h-you

2187 271 h-you
-- ??????o?^?\???f?[?^
2188 325 h-you
drop table if exists subconstrregist cascade;
2189 198 h-you

2190
create table subconstrregist (
2191 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '?\??????'
2192
  , CreateDate date not null comment '????'
2193
  , SeqNo decimal(2,0) unsigned not null comment '?\???A??'
2194
  , DataMode decimal(1,0) comment '?f?[?^??'
2195
  , SourceCode decimal(8,0) not null comment '??????R?[?h'
2196
  , PetitionPeriod decimal(4,0) unsigned not null comment '?\???N?x'
2197
  , CorporateStatusName varchar(40) comment '?@?l?i????'
2198
  , CorporateStatusPoint decimal(1,0) not null comment '?@?l?i?????u'
2199
  , CompanyName varchar(100) not null comment '???????'
2200
  , CEOPositionName varchar(60) comment '??\???E??'
2201
  , CEOName varchar(60) comment '??\?????'
2202
  , ContactPersonName varchar(60) comment '?S???????'
2203
  , ZipCode varchar(8) comment '?X????'
2204
  , Address1 varchar(60) comment '?Z???P'
2205
  , Address2 varchar(60) comment '?Z??2'
2206
  , Address3 varchar(60) comment '?Z??3'
2207
  , CellPhoneNumber varchar(13) comment '?g??d?b???'
2208
  , MailAddress varchar(257) comment '???[???A?h???X'
2209
  , PhoneNumber varchar(13) comment '?d?b???'
2210
  , FaxNumber varchar(13) comment 'FAX???'
2211
  , JapaneseSyllabary varchar(2) comment '50?????'
2212
  , StartDate date not null comment '????J?n?N????'
2213
  , Note varchar(300) comment '???l'
2214
  , labourKind decimal(1,0) not null comment '?x???????E????'
2215
  , OrderDate date comment '?\????'
2216
  , OrderNo decimal(2,0) unsigned not null comment '?\????t???'
2217
  , EntryDate datetime not null comment '?o?^???t'
2218
  , UpdateDate datetime not null comment '?X?V???t'
2219 198 h-you
  , constraint subconstrregist_PKC primary key (PersonCode,CreateDate,SeqNo)
2220 271 h-you
) comment '??????o?^?\???f?[?^' ;
2221 198 h-you

2222 271 h-you
-- ??????H??}?X?^
2223 325 h-you
drop table if exists subcontractoritemmaster cascade;
2224 198 h-you

2225
create table subcontractoritemmaster (
2226 271 h-you
  ItemCode decimal(5,0) unsigned not null comment '?H??L?['
2227
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2228
  , ItemName varchar(120) not null comment '?H????'
2229
  , DeleteFlg decimal(1,0) not null comment '???t???O'
2230
  , EntryDate datetime not null comment '?o?^???t'
2231
  , UpdateDate datetime not null comment '?X?V???t'
2232 198 h-you
  , constraint subcontractoritemmaster_PKC primary key (ItemCode)
2233 271 h-you
) comment '??????H??}?X?^' ;
2234 198 h-you

2235 271 h-you
-- ??????E??}?X?^
2236 325 h-you
drop table if exists subcontractorjobcategory cascade;
2237 198 h-you

2238
create table subcontractorjobcategory (
2239 271 h-you
  JobCategoryCode decimal(5,0) not null comment '?E??L?['
2240
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2241
  , JobCategoryName varchar(120) not null comment '?E????'
2242
  , DeleteFlg decimal(1,0) not null comment '???t???O'
2243
  , EntryDate datetime not null comment '?o?^???t'
2244
  , UpdateDate datetime not null comment '?X?V???t'
2245 198 h-you
  , constraint subcontractorjobcategory_PKC primary key (JobCategoryCode)
2246 271 h-you
) comment '??????E??}?X?^' ;
2247 198 h-you

2248 271 h-you
-- ??????{?H?H??f?[?^
2249 325 h-you
drop table if exists subcontractorjobitem cascade;
2250 198 h-you

2251
create table subcontractorjobitem (
2252 271 h-you
  CompanyCode decimal(8,0) not null comment '??????R?[?h'
2253
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
2254
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2255
  , EntryDate datetime not null comment '?o?^???t'
2256
  , UpdateDate datetime not null comment '?X?V???t'
2257 198 h-you
  , constraint subcontractorjobitem_PKC primary key (CompanyCode,ItemCode)
2258 271 h-you
) comment '??????{?H?H??f?[?^' ;
2259 198 h-you

2260
create index SubContractorJobItem_Index1
2261
  on subcontractorjobitem(CompanyCode);
2262

2263
create index SubContractorJobItem_Index2
2264
  on subcontractorjobitem(ItemCode);
2265

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

2269
create table subcontractorjoblink (
2270 271 h-you
  CompanyCode decimal(8,0) not null comment '??????R?[?h'
2271
  , JobCategoryCode decimal(5,0) not null comment '?E??L?['
2272
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2273
  , EntryDate datetime not null comment '?o?^???t'
2274
  , UpdateDate datetime not null comment '?X?V???t'
2275 198 h-you
  , constraint subcontractorjoblink_PKC primary key (CompanyCode,JobCategoryCode)
2276 271 h-you
) comment '??????E?????N?}?X?^' ;
2277 198 h-you

2278
create index SubContractorJobLink_Index1
2279
  on subcontractorjoblink(CompanyCode);
2280

2281
create index SubContractorJobLink_Index2
2282
  on subcontractorjoblink(JobCategoryCode);
2283

2284 271 h-you
-- ??????}?X?^
2285 325 h-you
drop table if exists subcontractormaster cascade;
2286 198 h-you

2287
create table subcontractormaster (
2288 271 h-you
  CompanyCode decimal(8,0) not null comment '??????R?[?h'
2289
  , DisplayOrder decimal(8,0) unsigned not null comment '?\????'
2290
  , CorporateStatusName varchar(40) comment '?@?l?i????'
2291
  , CorporateStatusPoint decimal(1,0) not null comment '?@?l?i?????u'
2292
  , CompanyName varchar(100) not null comment '???????'
2293
  , CEOPositionName varchar(60) comment '??\???E??'
2294
  , CEOName varchar(60) comment '??\?????'
2295
  , ContactPersonName varchar(60) comment '?S???????'
2296
  , ZipCode varchar(8) comment '?X????'
2297
  , Address1 varchar(60) comment '?Z???P'
2298
  , Address2 varchar(60) comment '?Z??2'
2299
  , Address3 varchar(60) comment '?Z??3'
2300
  , CellPhoneNumber varchar(13) comment '?g??d?b???'
2301
  , MailAddress varchar(257) comment '???[???A?h???X'
2302
  , PhoneNumber varchar(13) comment '?d?b???'
2303
  , FaxNumber varchar(13) comment 'FAX???'
2304
  , JapaneseSyllabary varchar(2) comment '50?????'
2305
  , StartDate date not null comment '????J?n?N????'
2306
  , Note varchar(300) comment '???l'
2307
  , labourKind decimal(1,0) not null comment '?x???????E????'
2308
  , DeleteFlg decimal(1,0) default '0' not null comment '???t???O'
2309
  , EntryDate datetime not null comment '?o?^???t'
2310
  , UpdateDate datetime not null comment '?X?V???t'
2311 198 h-you
  , constraint subcontractormaster_PKC primary key (CompanyCode)
2312 271 h-you
) comment '??????}?X?^' ;
2313 198 h-you

2314
create index SubContractorMaster_Index1
2315
  on subcontractormaster(JapaneseSyllabary);
2316

2317 271 h-you
-- ?d????}?X?^
2318 325 h-you
drop table if exists suppliersmaster cascade;
2319 198 h-you

2320
create table suppliersmaster (
2321 271 h-you
  SuppliersCode decimal(5,0) unsigned not null comment '?d????R?[?h'
2322
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2323
  , SuppliersName1 varchar(60) not null comment '?d????1'
2324
  , SuppliersName2 varchar(60) comment '?d?????Q'
2325
  , ZipCode varchar(8) comment '?X????'
2326
  , Address1 varchar(60) comment '?Z???P'
2327
  , Address2 varchar(60) comment '?Z??2'
2328
  , Address3 varchar(60) comment '?Z??3'
2329
  , PhoneNumber varchar(13) comment '?d?b???'
2330
  , FaxNumber varchar(13) comment 'FAX???'
2331
  , Note varchar(300) comment '???l'
2332
  , DeleteFlg decimal(1,0) not null comment '???t???O'
2333
  , EntryDate datetime not null comment '?o?^???t'
2334
  , UpdateDate datetime not null comment '?X?V???t'
2335 198 h-you
  , constraint suppliersmaster_PKC primary key (SuppliersCode)
2336 271 h-you
) comment '?d????}?X?^' ;
2337 198 h-you

2338 271 h-you
-- ?V?X?e???N???m?F?f?[?^
2339 325 h-you
drop table if exists systemexecute cascade;
2340 198 h-you

2341
create table systemexecute (
2342 271 h-you
  PrimaryCode tinyint(4) not null comment '?L?[????'
2343
  , TargetDate date not null comment '?N?????t'
2344
  , SystemVersion int(11) not null comment '?{??E????o?[?W????'
2345
  , UpDateCopyVersion int(11) not null comment '?R?s?[?o?[?W????'
2346
  , EntryDate datetime not null comment '?o?^???t'
2347
  , UpdateDate datetime not null comment '?X?V???t'
2348 198 h-you
  , constraint systemexecute_PKC primary key (PrimaryCode)
2349 271 h-you
) comment '?V?X?e???N???m?F?f?[?^' ;
2350 198 h-you

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

2354
create table systemmaster (
2355 271 h-you
  SystemCode decimal(3,0) unsigned not null comment '???R?[?h'
2356
  , CompanyName1 varchar(60) not null comment '?????P'
2357
  , CompanyName2 varchar(60) comment '?????Q'
2358
  , CEOName varchar(60) not null comment '??\?????'
2359
  , CEOPositionName varchar(60) comment '??\???E??'
2360
  , ZipCode varchar(8) not null comment '?X????'
2361
  , Address1 varchar(60) not null comment '?Z???P'
2362
  , Address2 varchar(60) comment '?Z??2'
2363
  , Address3 varchar(60) comment '?Z??3'
2364
  , PhoneNumber varchar(13) not null comment '?d?b???'
2365
  , FaxNumber varchar(13) comment 'FAX???'
2366
  , HomePageURL varchar(120) comment '?z?[???y?[?WURL'
2367
  , ConsumptionTax decimal(4,2) not null comment '?????'
2368
  , CooperationRate decimal(4,2) not null comment '???????'
2369
  , StatutoryWelfareRate decimal(4,2) not null comment '?@???????'
2370
  , FuelPrice decimal(5,2) not null comment '?R???L???P??'
2371
  , AreaDistance decimal(5,2) not null comment '????u????????'
2372
  , ExcelSavePath varchar(120) comment 'Excel????p?X'
2373
  , BusinessPeriod smallint(6) not null comment '????c?????'
2374 324 h-you
  , ConstrYear smallint(6) not null comment '????H???N?x'
2375
  , BusinessBeginDate datetime not null comment '?c????????'
2376
  , ConstrBeginDate datetime not null comment '?H???N?x?????'
2377
  , BusinessCompDate datetime not null comment '?c?????????'
2378
  , ConstrCompDate datetime not null comment '?H???N?x??????'
2379 271 h-you
  , ConstructionNoBase decimal(1,0) not null comment '?H????????l'
2380
  , SloganString1 varchar(100) comment '?W??1'
2381
  , SloganString2 varchar(100) comment '?W??2'
2382
  , SloganString3 varchar(100) comment '?W??3'
2383
  , EntryDate datetime not null comment '?o?^???t'
2384
  , UpdateDate datetime not null comment '?X?V???t'
2385 198 h-you
  , constraint systemmaster_PKC primary key (SystemCode)
2386 271 h-you
) comment '????}?X?^' ;
2387 198 h-you

2388 271 h-you
-- ?????}?X?^
2389 325 h-you
drop table if exists termmaster cascade;
2390 198 h-you

2391
create table termmaster (
2392 271 h-you
  ConstructionStatusFlg decimal(2,0) not null comment '?H?????t???O'
2393
  , FieldNo decimal(2,0) not null comment '?`?F?b?N???t?B?[???h???'
2394
  , SeqNo decimal(2,0) not null comment '?}??'
2395
  , DisplayOrder decimal(2,0) not null comment '?\????'
2396
  , CheckSchdule decimal(1,0) not null comment '?`?F?b?N?^?C?~???O'
2397
  , TermDays decimal(3,0) not null comment '?o???'
2398
  , SendTitile varchar(100) comment '?^?C?g??'
2399
  , SendMessage varchar(100) comment '???b?Z?[?W'
2400
  , BackColor varchar(8) comment '?w?i?F'
2401
  , ForeColor varchar(8) comment '?????F'
2402
  , EntryDate datetime not null comment '?o?^???t'
2403
  , UpdateDate datetime not null comment '?X?V???t'
2404 198 h-you
  , constraint termmaster_PKC primary key (ConstructionStatusFlg,FieldNo,SeqNo)
2405 271 h-you
) comment '?????}?X?^' ;
2406 198 h-you

2407
create index TermMaster_Index1
2408
  on termmaster(DisplayOrder);
2409

2410 271 h-you
-- ?o?????f?[?^
2411 325 h-you
drop table if exists tranceportdailydata cascade;
2412 198 h-you

2413
create table tranceportdailydata (
2414 271 h-you
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
2415
  , AttendanceDate date not null comment '???????'
2416
  , StartDistance decimal(7,1) not null comment '?????o???L????'
2417
  , ComplateDistance decimal(7,1) not null comment '?????I???L????'
2418
  , TotalDistance decimal(6,1) not null comment '???????v?L????'
2419
  , OfficeGoFlg decimal(1,0) not null comment '???????o??t???O'
2420
  , OfficeOutFlg decimal(1,0) not null comment '???????A??t???O'
2421
  , TrancePayGoFlg decimal(1,0) not null comment '?L?????o??t???O'
2422
  , TrancePayOutFlg decimal(1,0) not null comment '?L?????A??t???O'
2423
  , WareHouseFlg decimal(1,0) not null comment '????u??t???O'
2424
  , EntryDate datetime not null comment '?o?^???t'
2425
  , UpdateDate datetime not null comment '?X?V???t'
2426 198 h-you
  , constraint tranceportdailydata_PKC primary key (PersonCode,AttendanceDate)
2427 271 h-you
) comment '?o?????f?[?^' ;
2428 198 h-you

2429
create index TranceportDailyData_Index1
2430
  on tranceportdailydata(AttendanceDate);
2431

2432 271 h-you
-- ?H?????o???}?X?^
2433 325 h-you
drop table if exists typeexpensesmaster cascade;
2434 198 h-you

2435
create table typeexpensesmaster (
2436 271 h-you
  TypeCode decimal(5,0) unsigned not null comment '?H?????R?[?h'
2437
  , ExpensesPeriod smallint(6) not null comment '?????'
2438
  , NameCode decimal(5,0) unsigned not null comment '?o????R?[?h'
2439
  , ExpensesRaito decimal(4,2) not null comment '?o??'
2440
  , DeleteFlg decimal(1,0) not null comment '???t???O'
2441
  , EntryDate datetime not null comment '?o?^???t'
2442
  , UpdateDate datetime not null comment '?X?V???t'
2443 198 h-you
  , constraint typeexpensesmaster_PKC primary key (TypeCode,ExpensesPeriod,NameCode)
2444 271 h-you
) comment '?H?????o???}?X?^' ;
2445 198 h-you

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

2449
create table unitmaster (
2450 271 h-you
  UnitKey decimal(5,0) unsigned not null comment '?P??L?['
2451
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2452
  , UnitName varchar(30) not null comment '?P?????'
2453
  , EntryDate datetime not null comment '?o?^???t'
2454
  , UpdateDate datetime not null comment '?X?V???t'
2455 198 h-you
  , constraint unitmaster_PKC primary key (UnitKey)
2456 271 h-you
) comment '?P??}?X?^' ;
2457 198 h-you

2458
create index UnitMaster_Index1
2459
  on unitmaster(DisplayOrder);
2460

2461 271 h-you
-- ????}?X?^
2462 325 h-you
drop table if exists vehiclemaster cascade;
2463 198 h-you

2464
create table vehiclemaster (
2465 271 h-you
  VehicleCode decimal(5,0) unsigned not null comment '????R?[?h'
2466
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2467
  , VehicleName varchar(100) not null comment '???????'
2468
  , RegistrationNumber varchar(30) comment '?o?^???'
2469
  , IdentificationNumber varchar(30) comment '?????'
2470
  , ModelCode varchar(30) comment '?^??'
2471
  , DepartmentCode decimal(5,0) unsigned not null comment '???????'
2472
  , VehicleScheduleFlg decimal(1,0) not null comment '????\??\???t???O'
2473
  , PurchaseDate date comment '?w????'
2474
  , PurchaseName varchar(30) comment '?w????'
2475
  , PurchaseContactPersons varchar(30) comment '?w????S????'
2476
  , PurchasePhone varchar(13) comment '?w????d?b???'
2477
  , LeaseDate date comment '???[?X?J?n??'
2478
  , LeaseDestination varchar(30) comment '???[?X??'
2479
  , LeaseContactPersons varchar(30) comment '???[?X??S????'
2480
  , LeasePhone varchar(13) comment '???[?X??d?b???'
2481
  , InsuranceCompany varchar(30) comment '?C???????'
2482
  , InsuranceContactPersons varchar(30) comment '?C???????S????'
2483
  , InsurancePhone varchar(13) comment '?C???????d?b???'
2484
  , Note varchar(300) comment '???l'
2485
  , EntryDate datetime comment '?o?^???t'
2486
  , UpdateDate datetime comment '?X?V???t'
2487 198 h-you
  , constraint vehiclemaster_PKC primary key (VehicleCode)
2488 271 h-you
) comment '????}?X?^' ;
2489 198 h-you

2490 271 h-you
-- ????L?^?f?[?^
2491 325 h-you
drop table if exists vehiclerecorddata cascade;
2492 198 h-you

2493
create table vehiclerecorddata (
2494 271 h-you
  VehicleCode decimal(5,0) unsigned not null comment '????R?[?h'
2495
  , DivisionCode decimal(2,0) unsigned not null comment '?f?[?^??'
2496
  , SeqNo decimal(2,0) not null comment '?}??'
2497
  , RecordDate date comment '???n??'
2498
  , Mileage mediumint(9) comment '???s????'
2499
  , Content varchar(100) comment '???e'
2500
  , PaymentCost decimal(10,0) comment '??p'
2501
  , EntryDate datetime not null comment '?o?^???t'
2502
  , UpdateDate datetime not null comment '?X?V???t'
2503 198 h-you
  , constraint vehiclerecorddata_PKC primary key (VehicleCode,DivisionCode,SeqNo)
2504 271 h-you
) comment '????L?^?f?[?^' ;
2505 198 h-you

2506 271 h-you
-- ????\??f?[?^
2507 325 h-you
drop table if exists vehiclescheduledata cascade;
2508 198 h-you

2509
create table vehiclescheduledata (
2510 271 h-you
  TargetDate date not null comment '????'
2511
  , VehicleCode decimal(5,0) unsigned not null comment '????R?[?h'
2512
  , MorningAfternoon decimal(1,0) not null comment '??O?E???'
2513
  , PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
2514
  , TargetYear year(4) not null comment '?Y???N'
2515
  , TargetMonth tinyint(3) unsigned not null comment '?Y????'
2516
  , TargetDay year(4) not null comment '?Y????'
2517
  , EntryDate datetime not null comment '?o?^???t'
2518
  , UpdateDate datetime not null comment '?X?V???t'
2519 198 h-you
  , constraint vehiclescheduledata_PKC primary key (TargetDate,VehicleCode,MorningAfternoon)
2520 271 h-you
) comment '????\??f?[?^' ;
2521 198 h-you

2522
create index VehicleScheduleData_Index1
2523
  on vehiclescheduledata(TargetYear);
2524

2525
create index VehicleScheduleData_Index2
2526
  on vehiclescheduledata(TargetMonth);
2527

2528
create index VehicleScheduleData_Index3
2529
  on vehiclescheduledata(TargetDay);
2530

2531 271 h-you
-- ?N?}?X?^
2532 325 h-you
drop table if exists yearmaster cascade;
2533 198 h-you

2534
create table yearmaster (
2535 271 h-you
  years smallint(6) not null comment '?N'
2536 338 h-you
  , constraint yearmaster_PKC primary key (years)
2537 271 h-you
) comment '?N?}?X?^' ;