h-you / branches / ddl / MySQL_Create.sql @ 46
履歴 | 表示 | アノテート | ダウンロード (78 KB)
1 |
SET SESSION FOREIGN_KEY_CHECKS=0; |
---|---|
2 |
|
3 |
/* Drop Indexes */
|
4 |
|
5 |
DROP INDEX ActionScheduleData_Index1 ON ActionScheduleData; |
6 |
DROP INDEX ActionScheduleData_Index2 ON ActionScheduleData; |
7 |
DROP INDEX ActionScheduleData_Index3 ON ActionScheduleData; |
8 |
DROP INDEX BusinessTypeMaster_Index1 ON BusinessTypeMaster; |
9 |
DROP INDEX ComponentLinkMaster_Index1 ON ComponentLinkMaster; |
10 |
DROP INDEX ComponentLinkMaster_Index2 ON ComponentLinkMaster; |
11 |
DROP INDEX ComponentMaster_Index1 ON ComponentMaster; |
12 |
DROP INDEX ComponentToTypeMaster_Index1 ON ComponentToTypeMaster; |
13 |
DROP INDEX ComponentToTypeMaster_Index2 ON ComponentToTypeMaster; |
14 |
DROP INDEX BaseInfo_Index1 ON ConstructionBaseInfo; |
15 |
DROP INDEX BaseInfo_Index2 ON ConstructionBaseInfo; |
16 |
DROP INDEX BaseInfo_Index3 ON ConstructionBaseInfo; |
17 |
DROP INDEX BaseInfo_Index4 ON ConstructionBaseInfo; |
18 |
DROP INDEX BaseInfo_Index5 ON ConstructionBaseInfo; |
19 |
DROP INDEX BaseInfoDetail_Idx1 ON ConstructionBaseInfoDetail; |
20 |
DROP INDEX BaseInfoDetail_Idx2 ON ConstructionBaseInfoDetail; |
21 |
DROP INDEX LedgerDetail_Index01 ON ConstructionLedgerDetail; |
22 |
DROP INDEX LedgerDetail_Index02 ON ConstructionLedgerDetail; |
23 |
DROP INDEX LedgerDetail_Index03 ON ConstructionLedgerDetail; |
24 |
DROP INDEX LedgerExcute_Index1 ON ConstructionLedgerExcute; |
25 |
DROP INDEX ConstructionLink_Index1 ON ConstructionLink; |
26 |
DROP INDEX ConstructionLink_Index2 ON ConstructionLink; |
27 |
DROP INDEX ConstructionLink_Index3 ON ConstructionLink; |
28 |
DROP INDEX ConstructionSpecMaster_Index1 ON ConstructionSpecMaster; |
29 |
DROP INDEX CostDataOfPerson_Index1 ON CostDataOfPerson; |
30 |
DROP INDEX CostDataOfPerson_Index2 ON CostDataOfPerson; |
31 |
DROP INDEX DailyDataConstruction_Index1 ON DailyDataConstruction; |
32 |
DROP INDEX DailyDataConstruction_Index2 ON DailyDataConstruction; |
33 |
DROP INDEX DailyDataConstruction_Index3 ON DailyDataConstruction; |
34 |
DROP INDEX DailyDataDetail_Index ON DailyDataDetail; |
35 |
DROP INDEX DailyDataField_Index ON DailyDataField; |
36 |
DROP INDEX DailyDataMaterials_Index ON DailyDataMaterials; |
37 |
DROP INDEX DailyDataSubcontractors_Index ON DailyDataSubcontractors; |
38 |
DROP INDEX DailyDataVehicles_Index ON DailyDataVehicles; |
39 |
DROP INDEX DepartmentMaster_index1 ON DepartmentMaster; |
40 |
DROP INDEX EstimateData_Index1 ON EstimateData; |
41 |
DROP INDEX EstimateDataBody_Index1 ON EstimateDataBody; |
42 |
DROP INDEX EstimateDataDetail_Index1 ON EstimateDataDetail; |
43 |
DROP INDEX HolidayCalender_Index1 ON HolidayCalenderMaster; |
44 |
DROP INDEX HolidayCalenderMaster_Index2 ON HolidayCalenderMaster; |
45 |
DROP INDEX HolidayCalenderMaster_Index3 ON HolidayCalenderMaster; |
46 |
DROP INDEX InputSearchLogData_Index1 ON InputSearchLogData; |
47 |
DROP INDEX MessageBoardData_Index1 ON MessageBoardData; |
48 |
DROP INDEX MessageBoardData_Index2 ON MessageBoardData; |
49 |
DROP INDEX MessageBoardTerget_Index1 ON MessageBoardTerget; |
50 |
DROP INDEX PersonDepartmentMaster_Index1 ON PersonDepartmentMaster; |
51 |
DROP INDEX PersonDepartmentMaster_Index2 ON PersonDepartmentMaster; |
52 |
DROP INDEX PersonInChargeMaster_Index1 ON PersonInChargeMaster; |
53 |
DROP INDEX PersonInChargeMaster_Index2 ON PersonInChargeMaster; |
54 |
DROP INDEX PersonSalaryMaster_Index1 ON PersonSalaryMaster; |
55 |
DROP INDEX PersonSalaryMaster_Index2 ON PersonSalaryMaster; |
56 |
DROP INDEX ProcessExcuteMaster_Index1 ON ProcessExcuteMaster; |
57 |
DROP INDEX ProcessExcuteMaster_Index2 ON ProcessExcuteMaster; |
58 |
DROP INDEX POrderDetail_Index1 ON PurchaseOrderDetail; |
59 |
DROP INDEX SalesGraphData_Idx1 ON SalesGraphData; |
60 |
DROP INDEX SalesGraphData_idx2 ON SalesGraphData; |
61 |
DROP INDEX SecurityMaster_Index1 ON SecurityMaster; |
62 |
DROP INDEX SecurityMaster_Index2 ON SecurityMaster; |
63 |
DROP INDEX SecurityMaster_Index3 ON SecurityMaster; |
64 |
DROP INDEX SubContractorJobItem_Index1 ON SubContractorJobItem; |
65 |
DROP INDEX SubContractorJobItem_Index2 ON SubContractorJobItem; |
66 |
DROP INDEX SubContractorJobLink_Index1 ON SubContractorJobLink; |
67 |
DROP INDEX SubContractorJobLink_Index2 ON SubContractorJobLink; |
68 |
DROP INDEX SubContractorMaster_Index1 ON SubContractorMaster; |
69 |
DROP INDEX TermMaster_Index1 ON TermMaster; |
70 |
DROP INDEX UnitMaster_Index1 ON UnitMaster; |
71 |
DROP INDEX VehicleScheduleData_Index1 ON VehicleScheduleData; |
72 |
DROP INDEX VehicleScheduleData_Index2 ON VehicleScheduleData; |
73 |
DROP INDEX VehicleScheduleData_Index3 ON VehicleScheduleData; |
74 |
|
75 |
|
76 |
|
77 |
/* Drop Tables */
|
78 |
|
79 |
DROP TABLE IF EXISTS ActionScheduleData; |
80 |
DROP TABLE IF EXISTS ApprovalMaster; |
81 |
DROP TABLE IF EXISTS BK_ConstructionLedger; |
82 |
DROP TABLE IF EXISTS BK_ConstructionLedgerDetail; |
83 |
DROP TABLE IF EXISTS BK_ConstructionLedgerExcute; |
84 |
DROP TABLE IF EXISTS BK_EstimateData; |
85 |
DROP TABLE IF EXISTS BK_EstimateDataBody; |
86 |
DROP TABLE IF EXISTS BK_EstimateDataDetail; |
87 |
DROP TABLE IF EXISTS BusinessTypeMaster; |
88 |
DROP TABLE IF EXISTS CommonCostLarge; |
89 |
DROP TABLE IF EXISTS CommonCostLinkMS; |
90 |
DROP TABLE IF EXISTS CommonCostMiddle; |
91 |
DROP TABLE IF EXISTS CommonCostMiddleSearchWord; |
92 |
DROP TABLE IF EXISTS ComponentLinkMaster; |
93 |
DROP TABLE IF EXISTS ComponentMaster; |
94 |
DROP TABLE IF EXISTS ComponentToTypeMaster; |
95 |
DROP TABLE IF EXISTS ConstructionBaseInfo; |
96 |
DROP TABLE IF EXISTS ConstructionBaseInfoDetail; |
97 |
DROP TABLE IF EXISTS ConstructionBudget; |
98 |
DROP TABLE IF EXISTS ConstructionBudgetDetail; |
99 |
DROP TABLE IF EXISTS ConstructionItemMaster; |
100 |
DROP TABLE IF EXISTS ConstructionLedger; |
101 |
DROP TABLE IF EXISTS ConstructionLedgerDetail; |
102 |
DROP TABLE IF EXISTS ConstructionLedgerExcute; |
103 |
DROP TABLE IF EXISTS ConstructionLink; |
104 |
DROP TABLE IF EXISTS ConstructionProgressDate; |
105 |
DROP TABLE IF EXISTS ConstructionSpecMaster; |
106 |
DROP TABLE IF EXISTS ConstructionSpecUnitPrice; |
107 |
DROP TABLE IF EXISTS ConstructionTypeMaster; |
108 |
DROP TABLE IF EXISTS CostDataOfPerson; |
109 |
DROP TABLE IF EXISTS DailyDataConstruction; |
110 |
DROP TABLE IF EXISTS DailyDataDetail; |
111 |
DROP TABLE IF EXISTS DailyDataField; |
112 |
DROP TABLE IF EXISTS DailyDataMaterials; |
113 |
DROP TABLE IF EXISTS DailyDataSubcontractors; |
114 |
DROP TABLE IF EXISTS DailyDataVehicles; |
115 |
DROP TABLE IF EXISTS DepartmentExpensesMaster; |
116 |
DROP TABLE IF EXISTS DepartmentMaster; |
117 |
DROP TABLE IF EXISTS DivisionMaster; |
118 |
DROP TABLE IF EXISTS EstimateBudget; |
119 |
DROP TABLE IF EXISTS EstimateBudgetDetail; |
120 |
DROP TABLE IF EXISTS EstimateData; |
121 |
DROP TABLE IF EXISTS EstimateDataBody; |
122 |
DROP TABLE IF EXISTS EstimateDataDetail; |
123 |
DROP TABLE IF EXISTS ExpensesMaster; |
124 |
DROP TABLE IF EXISTS HolidayCalenderMaster; |
125 |
DROP TABLE IF EXISTS InputSearchLogData; |
126 |
DROP TABLE IF EXISTS MessageBoardData; |
127 |
DROP TABLE IF EXISTS MessageBoardTerget; |
128 |
DROP TABLE IF EXISTS MessageBrowsingHistory; |
129 |
DROP TABLE IF EXISTS OrderersMaster; |
130 |
DROP TABLE IF EXISTS OrdersPriceData; |
131 |
DROP TABLE IF EXISTS PersonDepartmentMaster; |
132 |
DROP TABLE IF EXISTS PersonInChargeMaster; |
133 |
DROP TABLE IF EXISTS PersonSalaryMaster; |
134 |
DROP TABLE IF EXISTS PointingOutComment; |
135 |
DROP TABLE IF EXISTS ProceedingsData; |
136 |
DROP TABLE IF EXISTS ProceedingsDataAttendee; |
137 |
DROP TABLE IF EXISTS ProceedingsDataDetail; |
138 |
DROP TABLE IF EXISTS ProcessApproval; |
139 |
DROP TABLE IF EXISTS ProcessApprovalDetail; |
140 |
DROP TABLE IF EXISTS ProcessExcuteMaster; |
141 |
DROP TABLE IF EXISTS PurchaseOrder; |
142 |
DROP TABLE IF EXISTS PurchaseOrderDetail; |
143 |
DROP TABLE IF EXISTS SalesGraphData; |
144 |
DROP TABLE IF EXISTS SecurityMaster; |
145 |
DROP TABLE IF EXISTS SubContractorItemMaster; |
146 |
DROP TABLE IF EXISTS SubContractorJobCategory; |
147 |
DROP TABLE IF EXISTS SubContractorJobItem; |
148 |
DROP TABLE IF EXISTS SubContractorJobLink; |
149 |
DROP TABLE IF EXISTS SubContractorMaster; |
150 |
DROP TABLE IF EXISTS SuppliersMaster; |
151 |
DROP TABLE IF EXISTS SystemExecute; |
152 |
DROP TABLE IF EXISTS SystemMaster; |
153 |
DROP TABLE IF EXISTS TermMaster; |
154 |
DROP TABLE IF EXISTS UnitMaster; |
155 |
DROP TABLE IF EXISTS VehicleMaster; |
156 |
DROP TABLE IF EXISTS VehicleRecordData; |
157 |
DROP TABLE IF EXISTS VehicleScheduleData; |
158 |
|
159 |
|
160 |
|
161 |
|
162 |
/* Create Tables */
|
163 |
|
164 |
-- 担当者行動予定データ
|
165 |
CREATE TABLE ActionScheduleData |
166 |
( |
167 |
TargetDate date NOT NULL COMMENT '対象日', |
168 |
PersonCode decimal(8,0) NOT NULL COMMENT '担当者コード', |
169 |
ActionSchedule varchar(30) COMMENT '行動予定', |
170 |
TargetYear year(4) NOT NULL COMMENT '該当年', |
171 |
TargetMonth year(2) NOT NULL COMMENT '該当月', |
172 |
TargetDay year(2) NOT NULL COMMENT '該当日', |
173 |
EntryDate datetime NOT NULL COMMENT '登録年月日', |
174 |
UpdateDate datetime NOT NULL COMMENT '更新年月日', |
175 |
PRIMARY KEY (TargetDate, PersonCode) |
176 |
) COMMENT = '担当者行動予定データ'; |
177 |
|
178 |
|
179 |
-- 承認経路マスタ
|
180 |
CREATE TABLE ApprovalMaster |
181 |
( |
182 |
ApprovalCode tinyint NOT NULL COMMENT '承認機能番号', |
183 |
DepartmentCode smallint NOT NULL COMMENT '部署コード', |
184 |
SeqNo year(2) NOT NULL COMMENT '枝番', |
185 |
DisplayOrder year(2) NOT NULL COMMENT '表示順', |
186 |
ApprovalPerson decimal(8,0) NOT NULL COMMENT '承認者コード', |
187 |
ApprovalAuthority decimal(1) NOT NULL COMMENT '承認権限区分', |
188 |
EntryDate datetime COMMENT '登録年月日', |
189 |
UpdateDate datetime COMMENT '更新年月日', |
190 |
PRIMARY KEY (ApprovalCode, DepartmentCode, SeqNo) |
191 |
) COMMENT = '承認経路マスタ'; |
192 |
|
193 |
|
194 |
-- 工事詳細台帳データ【退避用】
|
195 |
CREATE TABLE BK_ConstructionLedger |
196 |
( |
197 |
ConstructionCode decimal(10,0) NOT NULL COMMENT '工事コード', |
198 |
ConstructionPeriod year(4) NOT NULL COMMENT '事業期', |
199 |
CreatorCode decimal(8,0) COMMENT '作成者コード', |
200 |
CreatorName varchar(60) COMMENT '作成者名', |
201 |
CreateDate date NOT NULL COMMENT '作成日', |
202 |
ConstructionTimes decimal(5,2) NOT NULL COMMENT '工期(単位・月)', |
203 |
ConstructionStart date NOT NULL COMMENT '契約工期開始', |
204 |
ConstructionEnd date NOT NULL COMMENT '契約工期完了', |
205 |
OrdersDecisionPrice decimal(14,2) NOT NULL COMMENT '税抜受注決定金額', |
206 |
CompanyExpenses decimal(10,2) NOT NULL COMMENT '会社経費合計', |
207 |
DepartmentExpenses decimal(10,2) NOT NULL COMMENT '部署経費合計', |
208 |
SalesExpenses decimal(10,2) NOT NULL COMMENT '営業経費合計', |
209 |
TotalPayment decimal(10,2) NOT NULL COMMENT '総支払額', |
210 |
GrossProfit decimal(10,2) NOT NULL COMMENT '粗利', |
211 |
Allowance decimal(10,2) NOT NULL COMMENT '給与', |
212 |
NetProfit decimal(10,2) NOT NULL COMMENT '純利益', |
213 |
ComplateFlg decimal(1) NOT NULL COMMENT '入力完了フラグ', |
214 |
IntegrationFlg decimal(1) NOT NULL COMMENT '受注金額積算フラグ', |
215 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
216 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
217 |
PRIMARY KEY (ConstructionCode) |
218 |
) COMMENT = '工事詳細台帳データ【退避用】'; |
219 |
|
220 |
|
221 |
-- 工事詳細台帳明細データ【退避用】
|
222 |
CREATE TABLE BK_ConstructionLedgerDetail |
223 |
( |
224 |
ConstructionCode decimal(10,0) NOT NULL COMMENT '工事コード', |
225 |
GroupCount year(2) NOT NULL COMMENT 'グループ番号', |
226 |
LineCount tinyint NOT NULL COMMENT '行番号', |
227 |
ComponentCode smallint NOT NULL COMMENT '構成キー', |
228 |
ItemCode smallint NOT NULL COMMENT '工種キー', |
229 |
FirstString varchar(120) COMMENT '項目名称', |
230 |
SecondString varchar(120) COMMENT '工事内容', |
231 |
CompanyType decimal(1) NOT NULL COMMENT '協力会社コードタイプ', |
232 |
CompanyCode decimal(8,0) NOT NULL COMMENT '協力会社コード', |
233 |
CompanyName varchar(120) COMMENT '協力会社名称', |
234 |
EstimatePrice decimal(12,2) NOT NULL COMMENT '予算(見積)金額', |
235 |
ExecutionAmount decimal(12,2) NOT NULL COMMENT '実行金額', |
236 |
AmountConfigRate decimal(5,2) NOT NULL COMMENT '金額構成率', |
237 |
PaymentBurden decimal(12,2) NOT NULL COMMENT '支払補填額', |
238 |
FixDataFlg decimal(1) NOT NULL COMMENT '固定データフラグ', |
239 |
IndependentFlg decimal(1) NOT NULL COMMENT '独立データフラグ', |
240 |
FluctuationFlg decimal(1) NOT NULL COMMENT '増減データフラグ', |
241 |
SalaryFlg decimal(1) NOT NULL COMMENT '給与振分区分', |
242 |
SalaryDays year(4) NOT NULL COMMENT '給与振分日数', |
243 |
OperatingFlg decimal(1) NOT NULL COMMENT '担当中フラグ', |
244 |
SourceCode int NOT NULL COMMENT '元工事番号', |
245 |
JoinTitleFlg decimal(1) NOT NULL COMMENT '工事名称タイトル', |
246 |
SalaryOnRegist decimal(12,2) NOT NULL COMMENT '登録時月額給与', |
247 |
PurchaseOrderFlg year(2) NOT NULL COMMENT '注文書発行フラグ', |
248 |
EntryDate datetime NOT NULL COMMENT '登録年月日', |
249 |
UpdateDate datetime NOT NULL COMMENT '更新年月日', |
250 |
PRIMARY KEY (ConstructionCode, GroupCount, LineCount) |
251 |
) COMMENT = '工事詳細台帳明細データ【退避用】'; |
252 |
|
253 |
|
254 |
-- 工事詳細台帳実行データ【退避用】
|
255 |
CREATE TABLE BK_ConstructionLedgerExcute |
256 |
( |
257 |
ConstructionCode decimal(10,0) NOT NULL COMMENT '工事コード', |
258 |
GroupCount year(2) NOT NULL COMMENT 'グループ番号', |
259 |
LineCount tinyint NOT NULL COMMENT '行番号', |
260 |
ColumnCount tinyint NOT NULL COMMENT '列番号', |
261 |
PaymentAmount decimal(12,2) NOT NULL COMMENT '支払金額', |
262 |
TargetMonth date NOT NULL COMMENT '対象年月', |
263 |
EntryDate datetime NOT NULL COMMENT '登録年月日', |
264 |
UpdateDate datetime NOT NULL COMMENT '更新年月日', |
265 |
PRIMARY KEY (ConstructionCode, GroupCount, LineCount, ColumnCount) |
266 |
) COMMENT = '工事詳細台帳実行データ【退避用】'; |
267 |
|
268 |
|
269 |
-- 積算見積データ【退避用】
|
270 |
CREATE TABLE BK_EstimateData |
271 |
( |
272 |
SaveDate date NOT NULL COMMENT '退避日付', |
273 |
ConstructionCode decimal(10,0) NOT NULL COMMENT '工事コード', |
274 |
LineCount tinyint NOT NULL COMMENT '行番号', |
275 |
ComponentCode tinyint NOT NULL COMMENT '構成キー', |
276 |
FixedItemCode varchar(1) COMMENT '固定項目キー', |
277 |
ItemName varchar(120) COMMENT '作業名称', |
278 |
SpecName varchar(120) COMMENT '作業/品質・形状・寸法', |
279 |
PriceValue decimal(14,2) NOT NULL COMMENT '金額', |
280 |
note varchar(60) COMMENT '備考', |
281 |
MyExpensesFlg decimal(1) NOT NULL COMMENT '自社経費フラグ', |
282 |
InputFlg decimal(1) NOT NULL COMMENT '入力フラグ', |
283 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
284 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
285 |
PRIMARY KEY (SaveDate, ConstructionCode, LineCount) |
286 |
) COMMENT = '積算見積データ【退避用】'; |
287 |
|
288 |
|
289 |
-- 積算見積ページデータ【退避用】
|
290 |
CREATE TABLE BK_EstimateDataBody |
291 |
( |
292 |
SaveDate date NOT NULL COMMENT '退避日付', |
293 |
ConstructionCode decimal(10,0) NOT NULL COMMENT '工事コード', |
294 |
PageCount year(4) NOT NULL COMMENT 'ページ番号', |
295 |
Category decimal(1) NOT NULL COMMENT 'ページ区分', |
296 |
UnionComponentCode smallint NOT NULL COMMENT '所属構成キー', |
297 |
ComponentCode smallint NOT NULL COMMENT '構成キー', |
298 |
ItemCode smallint NOT NULL COMMENT '工種キー', |
299 |
SelectComponent smallint NOT NULL COMMENT '選択構成キー', |
300 |
PageTitle varchar(120) NOT NULL COMMENT 'ページ表示名', |
301 |
DetailLineCount tinyint NOT NULL COMMENT '明細行番号', |
302 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
303 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
304 |
PRIMARY KEY (SaveDate, ConstructionCode, PageCount) |
305 |
) COMMENT = '積算見積ページデータ【退避用】'; |
306 |
|
307 |
|
308 |
-- 積算見積データ明細【退避用】
|
309 |
CREATE TABLE BK_EstimateDataDetail |
310 |
( |
311 |
SaveDate date NOT NULL COMMENT '退避日付', |
312 |
ConstructionCode decimal(10,0) NOT NULL COMMENT '工事コード', |
313 |
PageCount year(4) NOT NULL COMMENT 'ページ番号', |
314 |
LineCount tinyint NOT NULL COMMENT '行番号', |
315 |
DataType decimal(1) NOT NULL COMMENT 'データ種別', |
316 |
ComponentCode smallint NOT NULL COMMENT '構成キー', |
317 |
ItemCode smallint NOT NULL COMMENT '工種キー', |
318 |
SpecCode smallint NOT NULL COMMENT '作業キー', |
319 |
ItemName varchar(120) COMMENT '作業名称', |
320 |
SpecName varchar(120) COMMENT '作業/品質・形状・寸法', |
321 |
Unitcount decimal(8,2) NOT NULL COMMENT '数量', |
322 |
UnitName varchar(30) COMMENT '単位名称', |
323 |
UnitPrice decimal(9,2) NOT NULL COMMENT '単価', |
324 |
LineTotal decimal(12,2) NOT NULL COMMENT '金額', |
325 |
note varchar(60) COMMENT '備考', |
326 |
CompanyCode decimal(8,0) NOT NULL COMMENT '協力会社コード', |
327 |
MyExpensesFlg decimal(1) NOT NULL COMMENT '自社経費フラグ', |
328 |
InputFlg decimal(1) COMMENT '入力フラグ', |
329 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
330 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
331 |
PRIMARY KEY (SaveDate, ConstructionCode, PageCount, LineCount) |
332 |
) COMMENT = '積算見積データ明細【退避用】'; |
333 |
|
334 |
|
335 |
-- 法人格マスタ
|
336 |
CREATE TABLE BusinessTypeMaster |
337 |
( |
338 |
BusinessTypeCode smallint NOT NULL COMMENT '業種コード', |
339 |
DisplayOrder smallint NOT NULL COMMENT '表示順', |
340 |
BusinessTypeName varchar(100) DEFAULT '' NOT NULL COMMENT '業種名', |
341 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
342 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
343 |
PRIMARY KEY (BusinessTypeCode) |
344 |
) COMMENT = '法人格マスタ'; |
345 |
|
346 |
|
347 |
-- 共通費大項目マスタ
|
348 |
CREATE TABLE CommonCostLarge |
349 |
( |
350 |
LargeCode smallint NOT NULL COMMENT '大項目キー', |
351 |
DisplayOrder smallint NOT NULL COMMENT '表示順', |
352 |
LargeName varchar(50) DEFAULT '' NOT NULL COMMENT '大項目名称', |
353 |
CommentText varchar(120) COMMENT '説明書き', |
354 |
DeleteFlg decimal(1) NOT NULL COMMENT '削除フラグ', |
355 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
356 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
357 |
PRIMARY KEY (LargeCode) |
358 |
) COMMENT = '共通費大項目マスタ'; |
359 |
|
360 |
|
361 |
-- 共通費工種関連マスタ
|
362 |
CREATE TABLE CommonCostLinkMS |
363 |
( |
364 |
LargeCode smallint NOT NULL COMMENT '大項目キー', |
365 |
MiddleCode smallint NOT NULL COMMENT '中項目キー', |
366 |
ItemCode smallint NOT NULL COMMENT '工種キー', |
367 |
EntryDate datetime COMMENT '登録年月日', |
368 |
UpdateDate datetime COMMENT '更新年月日', |
369 |
PRIMARY KEY (LargeCode, MiddleCode, ItemCode) |
370 |
) COMMENT = '共通費工種関連マスタ'; |
371 |
|
372 |
|
373 |
-- 共通費中項目マスタ
|
374 |
CREATE TABLE CommonCostMiddle |
375 |
( |
376 |
LargeCode smallint NOT NULL COMMENT '大項目キー', |
377 |
MiddleCode smallint NOT NULL COMMENT '中項目キー', |
378 |
DisplayOrder smallint NOT NULL COMMENT '表示順', |
379 |
MiddleName varchar(50) DEFAULT '' NOT NULL COMMENT '中項目名称', |
380 |
CommentText varchar(120) COMMENT '説明書き', |
381 |
DeleteFlg decimal(1) NOT NULL COMMENT '削除フラグ', |
382 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
383 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
384 |
PRIMARY KEY (LargeCode, MiddleCode) |
385 |
) COMMENT = '共通費中項目マスタ'; |
386 |
|
387 |
|
388 |
-- 共通費中項目キーマスタ
|
389 |
CREATE TABLE CommonCostMiddleSearchWord |
390 |
( |
391 |
LargeCode smallint NOT NULL COMMENT '大項目キー', |
392 |
MiddleCode smallint NOT NULL COMMENT '中項目キー', |
393 |
SeqNo smallint NOT NULL COMMENT '順序', |
394 |
SearchWord varchar(50) DEFAULT '' NOT NULL COMMENT '検索項目', |
395 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
396 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
397 |
PRIMARY KEY (LargeCode, MiddleCode, SeqNo) |
398 |
) COMMENT = '共通費中項目キーマスタ'; |
399 |
|
400 |
|
401 |
-- 構成工種関連マスタ
|
402 |
CREATE TABLE ComponentLinkMaster |
403 |
( |
404 |
ComponentCode smallint NOT NULL COMMENT '構成キー', |
405 |
ItemCode smallint NOT NULL COMMENT '工種キー', |
406 |
DisplayOrder decimal(5,0) COMMENT '表示順', |
407 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
408 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
409 |
PRIMARY KEY (ComponentCode, ItemCode) |
410 |
) COMMENT = '構成工種関連マスタ'; |
411 |
|
412 |
|
413 |
-- 構成マスタ
|
414 |
CREATE TABLE ComponentMaster |
415 |
( |
416 |
ComponentCode smallint NOT NULL COMMENT '構成キー', |
417 |
DisplayOrder smallint NOT NULL COMMENT '表示順', |
418 |
ComponentName varchar(120) DEFAULT '' NOT NULL COMMENT '構成名称', |
419 |
SubItemsFlg decimal(1) COMMENT '下位項目フラグ', |
420 |
DirectInputFlg decimal(1) COMMENT '直接入力フラグ', |
421 |
MyExpensesFlg decimal(1) COMMENT '自社経費フラグ', |
422 |
DeleteFlg decimal(1) NOT NULL COMMENT '削除フラグ', |
423 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
424 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
425 |
PRIMARY KEY (ComponentCode) |
426 |
) COMMENT = '構成マスタ'; |
427 |
|
428 |
|
429 |
-- 構成工事種別関連マスタ
|
430 |
CREATE TABLE ComponentToTypeMaster |
431 |
( |
432 |
ComponentCode smallint NOT NULL COMMENT '構成キー', |
433 |
TypeCode smallint NOT NULL COMMENT '工事種別コード', |
434 |
Dummy decimal(1) NOT NULL COMMENT 'ダミー項目', |
435 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
436 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
437 |
PRIMARY KEY (ComponentCode, TypeCode) |
438 |
) COMMENT = '構成工事種別関連マスタ'; |
439 |
|
440 |
|
441 |
-- 工事基本情報
|
442 |
CREATE TABLE ConstructionBaseInfo |
443 |
( |
444 |
ConstructionCode decimal(10,0) NOT NULL COMMENT '工事コード', |
445 |
TyingFlg decimal(1) NOT NULL COMMENT '紐付データフラグ', |
446 |
JoinFlg decimal(1) NOT NULL COMMENT '結合契約工事フラグ', |
447 |
ConstructionYear year(4) NOT NULL COMMENT '工事年度', |
448 |
ConstructionPeriod year(4) NOT NULL COMMENT '工事期数', |
449 |
RequestedDate date COMMENT '依頼受け日', |
450 |
EstimatesSubmitDeadline date COMMENT '見積提出期限', |
451 |
EstimatesSubmittedDate date COMMENT '見積提出日', |
452 |
ProvisionalOrderDate date COMMENT '仮受注日', |
453 |
OrderDate date COMMENT '受注日', |
454 |
OrderStartingDate date COMMENT '開始予定日', |
455 |
OrderCompletionDate date COMMENT '完了予定日', |
456 |
PreparationStartDate date COMMENT '施工準備開始日', |
457 |
ConstructionStartingDate date COMMENT '施工開始日', |
458 |
ConstructionCompletionDate date COMMENT '施工完了日', |
459 |
NonOrderDate date COMMENT '非受注日', |
460 |
OrdersDecisionPrice decimal(12,2) NOT NULL COMMENT '税抜受注決定金額', |
461 |
OrdersDecisionPriceInTax decimal(12,2) NOT NULL COMMENT '税込受注決定金額', |
462 |
SalesPersonCode decimal(8,0) COMMENT '営業担当者名', |
463 |
ConstructionPersonCode decimal(8,0) NOT NULL COMMENT '工事担当者', |
464 |
ConstrSubPersonCode decimal(8,0) NOT NULL COMMENT '工事副担当者', |
465 |
ConstructionInstructor decimal(8,0) NOT NULL COMMENT '工事指導員', |
466 |
TransferConstruction decimal(8,0) NOT NULL COMMENT '工事移管先コード', |
467 |
TransferConstructionDate date COMMENT '工事移管日', |
468 |
OrderersDivision smallint NOT NULL COMMENT '発注者区分', |
469 |
OrderersCode smallint NOT NULL COMMENT '発注者コード', |
470 |
EstimatesExpirationDate date COMMENT '見積有効期限', |
471 |
ConstructionPeriodStart date COMMENT '契約工期開始日', |
472 |
ConstructionPeriodEnd date COMMENT '契約工期完了', |
473 |
ConstructionPeriodStart2 date COMMENT '契約工期開始(延長時)', |
474 |
ConstructionPeriodEnd2 date COMMENT '契約工期完了(延長時)', |
475 |
StartDate date COMMENT '工事開始日', |
476 |
EndDate date COMMENT '工事終了日', |
477 |
PurchaseOrderMailingDate date COMMENT '注文書郵送日', |
478 |
PurchaseOrderReturnDate date COMMENT '注文書返送日', |
479 |
PurchaseOrderReturnCheckDate date COMMENT '注文書返送確認日', |
480 |
ConsumptionTaxFlg decimal(1) NOT NULL COMMENT '消費税フラグ', |
481 |
PrimeContractorFlg decimal(1) NOT NULL COMMENT '元請フラグ', |
482 |
SalesCostFlg decimal(1) NOT NULL COMMENT '営業経費発生フラグ', |
483 |
ConstructionStatusFlg decimal(2,0) NOT NULL COMMENT '工事状態フラグ', |
484 |
ConstructionType smallint NOT NULL COMMENT '工事種別コード', |
485 |
EstimateType decimal(1) NOT NULL COMMENT '見積種別', |
486 |
BillingStartDate date NOT NULL COMMENT '請求準備開始日', |
487 |
BillingDate date NOT NULL COMMENT '請求日', |
488 |
BillingSplitFlg decimal(1) NOT NULL COMMENT '請求回数フラグ', |
489 |
BillingSendDate date COMMENT '請求書郵送/手渡し日', |
490 |
LedgerComplateDate date NOT NULL COMMENT '工事詳細台帳入力完了日付', |
491 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
492 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
493 |
PRIMARY KEY (ConstructionCode) |
494 |
) COMMENT = '工事基本情報'; |
495 |
|
496 |
|
497 |
-- 工事基本情報明細
|
498 |
CREATE TABLE ConstructionBaseInfoDetail |
499 |
( |
500 |
ConstructionCode decimal(10,0) NOT NULL COMMENT '工事コード', |
501 |
DetailNo year(2) NOT NULL COMMENT '明細番号', |
502 |
DetailString varchar(120) COMMENT '明細内容', |
503 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
504 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
505 |
PRIMARY KEY (ConstructionCode, DetailNo) |
506 |
) COMMENT = '工事基本情報明細'; |
507 |
|
508 |
|
509 |
-- 工事施工予算データ
|
510 |
CREATE TABLE ConstructionBudget |
511 |
( |
512 |
ConstructionCode decimal(10,0) NOT NULL COMMENT '工事コード', |
513 |
CreatorCode decimal(8,0) NOT NULL COMMENT '作成者コード', |
514 |
CreatorName varchar(60) COMMENT '作成者名', |
515 |
CreatorCosts decimal(11,3) NOT NULL COMMENT '作成者給与', |
516 |
AssistantCode decimal(8,0) NOT NULL COMMENT '副担当者コード', |
517 |
AssistantName varchar(60) COMMENT '副担当者名', |
518 |
AssistantCosts decimal(11,3) NOT NULL COMMENT '副担当者給与', |
519 |
InstructorCode decimal(8,0) NOT NULL COMMENT '工事指導員コード', |
520 |
InstructorName varchar(60) COMMENT '工事指導員名', |
521 |
InstructorCosts decimal(11,3) NOT NULL COMMENT '工事指導員給与', |
522 |
CreateDate date NOT NULL COMMENT '作成日', |
523 |
ConstructionTimes decimal(5,2) NOT NULL COMMENT '工期(単位・月)', |
524 |
ConstructionStart date NOT NULL COMMENT '契約工期開始', |
525 |
ConstructionEnd date NOT NULL COMMENT '契約工期完了', |
526 |
InstructorTimes decimal(5,2) NOT NULL COMMENT '指導員稼働月数', |
527 |
SalaryFlg decimal(1) NOT NULL COMMENT '給与振分区分', |
528 |
SalaryDays year(4) NOT NULL COMMENT '振分日数', |
529 |
A_SalaryFlg decimal(1) NOT NULL COMMENT '副担当者給与振分区分', |
530 |
A_SalaryDays year(4) NOT NULL COMMENT '副担当者振分日数', |
531 |
I_SalaryFlg decimal(1) NOT NULL COMMENT '指導員給与振分区分', |
532 |
I_SalaryDays year(4) NOT NULL COMMENT '指導員振分日数', |
533 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
534 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
535 |
PRIMARY KEY (ConstructionCode) |
536 |
) COMMENT = '工事施工予算データ'; |
537 |
|
538 |
|
539 |
-- 工事施工予算データ明細
|
540 |
CREATE TABLE ConstructionBudgetDetail |
541 |
( |
542 |
ConstructionCode decimal(10,0) NOT NULL COMMENT '工事コード', |
543 |
GroupCount year(2) NOT NULL COMMENT 'グループ番号', |
544 |
LineCount tinyint NOT NULL COMMENT '行番号', |
545 |
ComponentCode smallint NOT NULL COMMENT '構成キー', |
546 |
ItemCode smallint NOT NULL COMMENT '工種キー', |
547 |
FirstString varchar(120) COMMENT '項目名称', |
548 |
SecondString varchar(120) COMMENT '工事内容', |
549 |
CompanyType decimal(1) NOT NULL COMMENT '協力会社コードタイプ', |
550 |
CompanyCode decimal(8,0) NOT NULL COMMENT '協力会社コード', |
551 |
CompanyName varchar(120) COMMENT '協力会社名称', |
552 |
EstimatePrice decimal(12,2) NOT NULL COMMENT '積算時見積金額', |
553 |
NegotiationPrice decimal(12,2) NOT NULL COMMENT '積算時交渉金額', |
554 |
OrderDesiredAmount decimal(12,2) NOT NULL COMMENT '発注希望金額', |
555 |
ExecutionAmount decimal(12,2) NOT NULL COMMENT '実行金額', |
556 |
AmountConfigRate decimal(5,2) NOT NULL COMMENT '金額構成率', |
557 |
NegotiateFlg decimal(1) NOT NULL COMMENT '協力業者交渉フラグ', |
558 |
EntryDate datetime NOT NULL COMMENT '登録年月日', |
559 |
UpdateDate datetime NOT NULL COMMENT '更新年月日', |
560 |
PRIMARY KEY (ConstructionCode, GroupCount, LineCount) |
561 |
) COMMENT = '工事施工予算データ明細'; |
562 |
|
563 |
|
564 |
-- 工種マスタ
|
565 |
CREATE TABLE ConstructionItemMaster |
566 |
( |
567 |
ItemCode smallint NOT NULL COMMENT '工種キー', |
568 |
DisplayOrder decimal(5,0) NOT NULL COMMENT '表示順', |
569 |
ItemName varchar(120) DEFAULT '' NOT NULL COMMENT '工種名称', |
570 |
SubItemsFlg decimal(1) COMMENT '下位項目フラグ', |
571 |
MyExpensesFlg decimal(1) NOT NULL COMMENT '自社経費フラグ', |
572 |
DeleteFlg decimal(1) NOT NULL COMMENT '削除フラグ', |
573 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
574 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
575 |
PRIMARY KEY (ItemCode) |
576 |
) COMMENT = '工種マスタ'; |
577 |
|
578 |
|
579 |
-- 工事詳細台帳データ
|
580 |
CREATE TABLE ConstructionLedger |
581 |
( |
582 |
ConstructionCode decimal(10,0) NOT NULL COMMENT '工事コード', |
583 |
ConstructionPeriod year(4) NOT NULL COMMENT '事業期', |
584 |
CreatorCode decimal(8,0) COMMENT '作成者コード', |
585 |
CreatorName varchar(60) COMMENT '作成者名', |
586 |
CreateDate date NOT NULL COMMENT '作成日', |
587 |
ConstructionTimes decimal(5,2) NOT NULL COMMENT '工期(単位・月)', |
588 |
ConstructionStart date NOT NULL COMMENT '契約工期開始', |
589 |
ConstructionEnd date NOT NULL COMMENT '契約工期完了', |
590 |
OrdersDecisionPrice decimal(14,2) NOT NULL COMMENT '税抜受注決定金額', |
591 |
CompanyExpenses decimal(10,2) NOT NULL COMMENT '会社経費合計', |
592 |
DepartmentExpenses decimal(10,2) NOT NULL COMMENT '部署経費合計', |
593 |
SalesExpenses decimal(10,2) NOT NULL COMMENT '営業経費合計', |
594 |
TotalPayment decimal(10,2) NOT NULL COMMENT '総支払額', |
595 |
GrossProfit decimal(10,2) NOT NULL COMMENT '粗利', |
596 |
Allowance decimal(10,2) NOT NULL COMMENT '給与', |
597 |
NetProfit decimal(10,2) NOT NULL COMMENT '純利益', |
598 |
ComplateFlg decimal(1) NOT NULL COMMENT '入力完了フラグ', |
599 |
IntegrationFlg decimal(1) NOT NULL COMMENT '受注金額積算フラグ', |
600 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
601 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
602 |
PRIMARY KEY (ConstructionCode) |
603 |
) COMMENT = '工事詳細台帳データ'; |
604 |
|
605 |
|
606 |
-- 工事詳細台帳明細データ
|
607 |
CREATE TABLE ConstructionLedgerDetail |
608 |
( |
609 |
ConstructionCode decimal(10,0) NOT NULL COMMENT '工事コード', |
610 |
GroupCount year(2) NOT NULL COMMENT 'グループ番号', |
611 |
LineCount tinyint NOT NULL COMMENT '行番号', |
612 |
ComponentCode smallint NOT NULL COMMENT '構成キー', |
613 |
ItemCode smallint NOT NULL COMMENT '工種キー', |
614 |
FirstString varchar(120) COMMENT '項目名称', |
615 |
SecondString varchar(120) COMMENT '工事内容', |
616 |
CompanyType decimal(1) NOT NULL COMMENT '協力会社コードタイプ', |
617 |
CompanyCode decimal(8,0) NOT NULL COMMENT '協力会社コード', |
618 |
CompanyName varchar(120) COMMENT '協力会社名称', |
619 |
EstimatePrice decimal(12,2) NOT NULL COMMENT '予算(見積)金額', |
620 |
ExecutionAmount decimal(12,2) NOT NULL COMMENT '実行金額', |
621 |
AmountConfigRate decimal(5,2) NOT NULL COMMENT '金額構成率', |
622 |
PaymentBurden decimal(12,2) NOT NULL COMMENT '支払補填額', |
623 |
FixDataFlg decimal(1) NOT NULL COMMENT '固定データフラグ', |
624 |
IndependentFlg decimal(1) NOT NULL COMMENT '独立データフラグ', |
625 |
FluctuationFlg decimal(1) NOT NULL COMMENT '増減データフラグ', |
626 |
SalaryFlg decimal(1) NOT NULL COMMENT '給与振分区分', |
627 |
SalaryDays year(4) NOT NULL COMMENT '給与振分日数', |
628 |
OperatingFlg decimal(1) NOT NULL COMMENT '担当中フラグ', |
629 |
SourceCode int NOT NULL COMMENT '元工事番号', |
630 |
JoinTitleFlg decimal(1) NOT NULL COMMENT '工事名称タイトル', |
631 |
SalaryOnRegist decimal(12,2) NOT NULL COMMENT '登録時月額給与', |
632 |
PurchaseOrderFlg year(2) NOT NULL COMMENT '注文書発行フラグ', |
633 |
EntryDate datetime NOT NULL COMMENT '登録年月日', |
634 |
UpdateDate datetime NOT NULL COMMENT '更新年月日', |
635 |
PRIMARY KEY (ConstructionCode, GroupCount, LineCount) |
636 |
) COMMENT = '工事詳細台帳明細データ'; |
637 |
|
638 |
|
639 |
-- 工事詳細台帳実行データ
|
640 |
CREATE TABLE ConstructionLedgerExcute |
641 |
( |
642 |
ConstructionCode decimal(10,0) NOT NULL COMMENT '工事コード', |
643 |
GroupCount year(2) NOT NULL COMMENT 'グループ番号', |
644 |
LineCount tinyint NOT NULL COMMENT '行番号', |
645 |
ColumnCount tinyint NOT NULL COMMENT '列番号', |
646 |
PaymentAmount decimal(12,2) NOT NULL COMMENT '支払金額', |
647 |
TargetMonth date NOT NULL COMMENT '対象年月', |
648 |
EntryDate datetime NOT NULL COMMENT '登録年月日', |
649 |
UpdateDate datetime NOT NULL COMMENT '更新年月日', |
650 |
PRIMARY KEY (ConstructionCode, GroupCount, LineCount, ColumnCount) |
651 |
) COMMENT = '工事詳細台帳実行データ'; |
652 |
|
653 |
|
654 |
-- 工事リンク情報
|
655 |
CREATE TABLE ConstructionLink |
656 |
( |
657 |
ConstructionCode decimal(10,0) NOT NULL COMMENT '工事コード', |
658 |
FluctuationCode decimal(10,0) NOT NULL COMMENT '子工事番号', |
659 |
LinkType decimal(1) NOT NULL COMMENT 'リンク種別', |
660 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
661 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
662 |
PRIMARY KEY (ConstructionCode, FluctuationCode) |
663 |
) COMMENT = '工事リンク情報'; |
664 |
|
665 |
|
666 |
-- 案件進捗日付データ
|
667 |
CREATE TABLE ConstructionProgressDate |
668 |
( |
669 |
ConstructionCode decimal(10,0) NOT NULL COMMENT '工事番号', |
670 |
ConstructionStatusFlg year(2) NOT NULL COMMENT '設定工事状態', |
671 |
PreviousStatusFlg year(2) COMMENT '変更前状態', |
672 |
ChangeDate date NOT NULL COMMENT '設定日付', |
673 |
ChangePersonCode decimal(8,0) NOT NULL COMMENT '設定担当者', |
674 |
EntryDate datetime NOT NULL COMMENT '登録年月日', |
675 |
UpdateDate datetime NOT NULL COMMENT '更新年月日', |
676 |
PRIMARY KEY (ConstructionCode, ConstructionStatusFlg) |
677 |
) COMMENT = '案件進捗日付データ'; |
678 |
|
679 |
|
680 |
-- 作業マスタ
|
681 |
CREATE TABLE ConstructionSpecMaster |
682 |
( |
683 |
ItemCode smallint NOT NULL COMMENT '工種キー', |
684 |
SpecCode smallint NOT NULL COMMENT '作業キー', |
685 |
DisplayOrder smallint NOT NULL COMMENT '表示順', |
686 |
ItemName varchar(120) DEFAULT '' COMMENT '作業名称', |
687 |
SpecName varchar(120) COMMENT '作業名称', |
688 |
UnitName varchar(30) COMMENT '単位名称', |
689 |
UnitPrice decimal(9,2) NOT NULL COMMENT '単価', |
690 |
DeleteFlg decimal(1) NOT NULL COMMENT '削除フラグ', |
691 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
692 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
693 |
PRIMARY KEY (ItemCode, SpecCode) |
694 |
) COMMENT = '作業マスタ'; |
695 |
|
696 |
|
697 |
-- 作業単価マスタ
|
698 |
CREATE TABLE ConstructionSpecUnitPrice |
699 |
( |
700 |
ComponentCode smallint NOT NULL COMMENT '構成キー', |
701 |
ItemCode smallint NOT NULL COMMENT '工種キー', |
702 |
SpecCode smallint NOT NULL COMMENT '作業キー', |
703 |
ConstructionTypeCode smallint NOT NULL COMMENT '工事種別コード', |
704 |
UnitPrice decimal(9,2) NOT NULL COMMENT '単価', |
705 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
706 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
707 |
PRIMARY KEY (ComponentCode, ItemCode, SpecCode, ConstructionTypeCode) |
708 |
) COMMENT = '作業単価マスタ'; |
709 |
|
710 |
|
711 |
-- 工事種別マスタ
|
712 |
CREATE TABLE ConstructionTypeMaster |
713 |
( |
714 |
TypeCode smallint NOT NULL COMMENT '種別コード', |
715 |
DisplayOrder smallint NOT NULL COMMENT '表示順', |
716 |
NameString varchar(100) DEFAULT '' NOT NULL COMMENT '名称', |
717 |
PublicFlg decimal(1) NOT NULL COMMENT '工事種別フラグ', |
718 |
DeleteFlg decimal(1,0) NOT NULL COMMENT '削除フラグ', |
719 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
720 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
721 |
PRIMARY KEY (TypeCode) |
722 |
) COMMENT = '工事種別マスタ'; |
723 |
|
724 |
|
725 |
-- 担当者毎経費データ
|
726 |
CREATE TABLE CostDataOfPerson |
727 |
( |
728 |
PersonCode decimal(8,0) NOT NULL COMMENT '担当者コード', |
729 |
ActionDate date NOT NULL COMMENT '対象日付', |
730 |
DataType decimal(1) NOT NULL COMMENT 'データ区分', |
731 |
DataAddCount smallint NOT NULL COMMENT 'データ追加番号', |
732 |
TargetMonth varchar(7) NOT NULL COMMENT '対象年月', |
733 |
ConstructionCode int COMMENT '工事番号', |
734 |
SuppliersCode smallint NOT NULL COMMENT '支払先コード', |
735 |
SuppliersName varchar(120) COMMENT '支払先名称', |
736 |
PaymentContent varchar(60) COMMENT '支払内容', |
737 |
PaymentType decimal(1) NOT NULL COMMENT '支払方法フラグ', |
738 |
EntryPrice decimal(12,2) NOT NULL COMMENT '金額(税抜)', |
739 |
EntryPriceInTax decimal(12,2) NOT NULL COMMENT '金額(税込)', |
740 |
SlipNumber varchar(12) COMMENT '伝票番号', |
741 |
ComplateFlg decimal(1) NOT NULL COMMENT '引込済みフラグ', |
742 |
ApprovalFlg decimal(1) NOT NULL COMMENT '承認フラグ', |
743 |
EntryDate datetime NOT NULL COMMENT '登録年月日', |
744 |
UpdateDate datetime NOT NULL COMMENT '更新年月日', |
745 |
PRIMARY KEY (PersonCode, ActionDate, DataType, DataAddCount) |
746 |
) COMMENT = '担当者毎経費データ'; |
747 |
|
748 |
|
749 |
-- 日報データ
|
750 |
CREATE TABLE DailyDataConstruction |
751 |
( |
752 |
PersonCode decimal(8,0) NOT NULL COMMENT '作成者コード', |
753 |
DailyDataDate date NOT NULL COMMENT '日報作成日', |
754 |
ConstructionCode decimal(10,0) NOT NULL COMMENT '工事コード', |
755 |
Weather varchar(60) COMMENT '天気', |
756 |
EntryDate datetime NOT NULL COMMENT '登録年月日', |
757 |
UpdateDate datetime NOT NULL COMMENT '更新年月日', |
758 |
PRIMARY KEY (PersonCode, DailyDataDate, ConstructionCode) |
759 |
) COMMENT = '日報データ'; |
760 |
|
761 |
|
762 |
-- 日報データ (明細)
|
763 |
CREATE TABLE DailyDataDetail |
764 |
( |
765 |
PersonCode decimal(8,0) NOT NULL COMMENT '作成者コード', |
766 |
DailyDataDate date NOT NULL COMMENT '日報作成日', |
767 |
ConstructionCode int NOT NULL COMMENT '工事番号', |
768 |
SeqNo tinyint NOT NULL COMMENT '明細行番号', |
769 |
JobCategoryCode smallint NOT NULL COMMENT '職種キー', |
770 |
CompanyCode decimal(8,0) NOT NULL COMMENT '協力会社コード', |
771 |
TodayHeadCount decimal(4,1) NOT NULL COMMENT '当日人員数', |
772 |
TotalHeadCount decimal(5,1) NOT NULL COMMENT '累計人員数', |
773 |
TodayWork varchar(100) COMMENT '当日作業内容', |
774 |
NextdayWork varchar(100) COMMENT '翌日作業内容', |
775 |
NextdayHeadCount decimal(4,1) NOT NULL COMMENT '翌日人員数', |
776 |
EntryDate datetime NOT NULL COMMENT '登録年月日', |
777 |
UpdateDate datetime NOT NULL COMMENT '更新年月日', |
778 |
PRIMARY KEY (PersonCode, DailyDataDate, ConstructionCode, SeqNo) |
779 |
) COMMENT = '日報データ (明細)'; |
780 |
|
781 |
|
782 |
-- 日報データ (現場巡回)
|
783 |
CREATE TABLE DailyDataField |
784 |
( |
785 |
PersonCode decimal(8,0) NOT NULL COMMENT '作成者コード', |
786 |
DailyDataDate date NOT NULL COMMENT '日報作成日', |
787 |
ConstructionCode int NOT NULL COMMENT '工事番号', |
788 |
SeqNo tinyint NOT NULL COMMENT '明細行番号', |
789 |
PatrolTime datetime NOT NULL COMMENT '巡回時間', |
790 |
ContentsText varchar(200) COMMENT '内容', |
791 |
EntryDate datetime NOT NULL COMMENT '登録年月日', |
792 |
UpdateDate datetime NOT NULL COMMENT '更新年月日', |
793 |
PRIMARY KEY (PersonCode, DailyDataDate, ConstructionCode, SeqNo) |
794 |
) COMMENT = '日報データ (現場巡回)'; |
795 |
|
796 |
|
797 |
-- 日報データ (資材)
|
798 |
CREATE TABLE DailyDataMaterials |
799 |
( |
800 |
PersonCode decimal(8,0) NOT NULL COMMENT '作成者コード', |
801 |
DailyDataDate date NOT NULL COMMENT '日報作成日', |
802 |
ConstructionCode int NOT NULL COMMENT '工事番号', |
803 |
SeqNo tinyint NOT NULL COMMENT '明細行番号', |
804 |
Materials varchar(100) COMMENT '資材名', |
805 |
Quantity varchar(100) COMMENT '数量', |
806 |
Production varchar(100) COMMENT '制作会社', |
807 |
Delivery varchar(100) COMMENT '納入業者', |
808 |
QualityControl varchar(100) COMMENT '品質管理事項', |
809 |
EntryDate datetime NOT NULL COMMENT '登録年月日', |
810 |
UpdateDate datetime NOT NULL COMMENT '更新年月日', |
811 |
PRIMARY KEY (PersonCode, DailyDataDate, ConstructionCode, SeqNo) |
812 |
) COMMENT = '日報データ (資材)'; |
813 |
|
814 |
|
815 |
-- 日報データ (協力業者指示)
|
816 |
CREATE TABLE DailyDataSubcontractors |
817 |
( |
818 |
PersonCode decimal(8,0) NOT NULL COMMENT '作成者コード', |
819 |
DailyDataDate date NOT NULL COMMENT '日報作成日', |
820 |
ConstructionCode int NOT NULL COMMENT '工事番号', |
821 |
SeqNo tinyint NOT NULL COMMENT '明細行番号', |
822 |
Attendee varchar(100) COMMENT '出席者', |
823 |
ContentsText varchar(200) COMMENT '内容', |
824 |
EntryDate datetime NOT NULL COMMENT '登録年月日', |
825 |
UpdateDate datetime NOT NULL COMMENT '更新年月日', |
826 |
PRIMARY KEY (PersonCode, DailyDataDate, ConstructionCode, SeqNo) |
827 |
) COMMENT = '日報データ (協力業者指示)'; |
828 |
|
829 |
|
830 |
-- 日報データ (車両)
|
831 |
CREATE TABLE DailyDataVehicles |
832 |
( |
833 |
PersonCode decimal(8,0) NOT NULL COMMENT '作成者コード', |
834 |
DailyDataDate date NOT NULL COMMENT '日報作成日', |
835 |
ConstructionCode int NOT NULL COMMENT '工事番号', |
836 |
SeqNo tinyint NOT NULL COMMENT '明細行番号', |
837 |
Model varchar(100) COMMENT '機種', |
838 |
Performance varchar(100) COMMENT '性能', |
839 |
Owner varchar(100) COMMENT '所有会社', |
840 |
Driver varchar(100) COMMENT '当日運転者', |
841 |
StartWorkingTime datetime NOT NULL COMMENT '作業時間開始', |
842 |
EndWorkingTime datetime NOT NULL COMMENT '作業時間終了', |
843 |
EntryDate datetime NOT NULL COMMENT '登録年月日', |
844 |
UpdateDate datetime NOT NULL COMMENT '更新年月日', |
845 |
PRIMARY KEY (PersonCode, DailyDataDate, ConstructionCode, SeqNo) |
846 |
) COMMENT = '日報データ (車両)'; |
847 |
|
848 |
|
849 |
-- 部署経費率マスタ
|
850 |
CREATE TABLE DepartmentExpensesMaster |
851 |
( |
852 |
DepartmentCode smallint NOT NULL COMMENT '部署コード', |
853 |
ExpensesPeriod year(4) NOT NULL COMMENT '事業期', |
854 |
NameCode smallint NOT NULL COMMENT '経費名称コード', |
855 |
DisplayOrder smallint NOT NULL COMMENT '表示順', |
856 |
ExpensesRatio decimal(4,2) NOT NULL COMMENT '経費率', |
857 |
DeleteFlg decimal(1,0) NOT NULL COMMENT '削除フラグ', |
858 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
859 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
860 |
PRIMARY KEY (DepartmentCode, ExpensesPeriod, NameCode) |
861 |
) COMMENT = '部署経費率マスタ'; |
862 |
|
863 |
|
864 |
-- 部署マスタ
|
865 |
CREATE TABLE DepartmentMaster |
866 |
( |
867 |
DepartmentCode smallint NOT NULL COMMENT '部署コード', |
868 |
DisplayOrder smallint NOT NULL COMMENT '表示順', |
869 |
DepartmentString varchar(100) DEFAULT '' NOT NULL COMMENT '部署名', |
870 |
ActionScheduleFlg decimal(1) NOT NULL COMMENT '行動予定表示フラグ', |
871 |
StaffAssignFlg decimal(1) NOT NULL COMMENT '人員配置表示フラグ', |
872 |
DeleteFlg decimal(1,0) NOT NULL COMMENT '削除フラグ', |
873 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
874 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
875 |
PRIMARY KEY (DepartmentCode) |
876 |
) COMMENT = '部署マスタ'; |
877 |
|
878 |
|
879 |
-- 区分マスタ
|
880 |
CREATE TABLE DivisionMaster |
881 |
( |
882 |
DivisionCode smallint NOT NULL COMMENT '区分コード', |
883 |
NameCode smallint NOT NULL COMMENT '名称コード', |
884 |
DisplayOrder smallint NOT NULL COMMENT '表示順', |
885 |
NameString varchar(100) DEFAULT '' NOT NULL COMMENT '名称', |
886 |
DeleteFlg decimal(1,0) NOT NULL COMMENT '削除フラグ', |
887 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
888 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
889 |
PRIMARY KEY (DivisionCode, NameCode) |
890 |
) COMMENT = '区分マスタ'; |
891 |
|
892 |
|
893 |
-- 積算予算書データ
|
894 |
CREATE TABLE EstimateBudget |
895 |
( |
896 |
ConstructionCode decimal(10,0) NOT NULL COMMENT '工事コード', |
897 |
ConstructionTime decimal(4,1) NOT NULL COMMENT '工期', |
898 |
IntegratedCode decimal(8,0) NOT NULL COMMENT '積算者', |
899 |
DataCreateDate date NOT NULL COMMENT 'データ引込日', |
900 |
RetValue1 decimal(12,2) NOT NULL COMMENT '予定価格', |
901 |
RetValue2 decimal(12,2) NOT NULL COMMENT '直接工事費', |
902 |
RetValue3 decimal(12,2) NOT NULL COMMENT '積み上げ共通仮設費', |
903 |
RetValue4 decimal(12,2) NOT NULL COMMENT '積み上げ現場管理費', |
904 |
RetPercent decimal(5,2) NOT NULL COMMENT '一般管理費率', |
905 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
906 |
UpdateDate datetime COMMENT '更新日付', |
907 |
PRIMARY KEY (ConstructionCode) |
908 |
) COMMENT = '積算予算書データ'; |
909 |
|
910 |
|
911 |
-- 積算予算内訳データ明細
|
912 |
CREATE TABLE EstimateBudgetDetail |
913 |
( |
914 |
ConstructionCode decimal(10,0) NOT NULL COMMENT '工事コード', |
915 |
GroupCount year(2) NOT NULL COMMENT 'グループ番号', |
916 |
LineCount tinyint NOT NULL COMMENT '行番号', |
917 |
ComponentCode smallint NOT NULL COMMENT '構成キー', |
918 |
ItemCode smallint COMMENT '工種キー', |
919 |
CompanyCode decimal(8,0) NOT NULL COMMENT '協力会社コード', |
920 |
FirstString varchar(120) COMMENT '大項目名称', |
921 |
SecondString varchar(120) COMMENT '工種名称・協力会社名', |
922 |
Content varchar(120) COMMENT '内容', |
923 |
EstimatePrice decimal(12,2) NOT NULL COMMENT '見積時金額', |
924 |
NegotiationPrice decimal(12,2) NOT NULL COMMENT '交渉時金額', |
925 |
Notes varchar(120) COMMENT '注意事項', |
926 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
927 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
928 |
PRIMARY KEY (ConstructionCode, GroupCount, LineCount) |
929 |
) COMMENT = '積算予算内訳データ明細'; |
930 |
|
931 |
|
932 |
-- 積算見積データ
|
933 |
CREATE TABLE EstimateData |
934 |
( |
935 |
ConstructionCode decimal(10,0) NOT NULL COMMENT '工事コード', |
936 |
LineCount tinyint NOT NULL COMMENT '行番号', |
937 |
ComponentCode tinyint NOT NULL COMMENT '構成キー', |
938 |
FixedItemCode varchar(1) COMMENT '固定項目キー', |
939 |
ItemName varchar(120) COMMENT '作業名称', |
940 |
SpecName varchar(120) COMMENT '作業/品質・形状・寸法', |
941 |
PriceValue decimal(14,2) NOT NULL COMMENT '金額', |
942 |
note varchar(60) COMMENT '備考', |
943 |
MyExpensesFlg decimal(1) NOT NULL COMMENT '自社経費フラグ', |
944 |
InputFlg decimal(1) NOT NULL COMMENT '入力フラグ', |
945 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
946 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
947 |
PRIMARY KEY (ConstructionCode, LineCount) |
948 |
) COMMENT = '積算見積データ'; |
949 |
|
950 |
|
951 |
-- 積算見積ページデータ
|
952 |
CREATE TABLE EstimateDataBody |
953 |
( |
954 |
ConstructionCode decimal(10,0) NOT NULL COMMENT '工事コード', |
955 |
PageCount year(4) NOT NULL COMMENT 'ページ番号', |
956 |
Category decimal(1) NOT NULL COMMENT 'ページ区分', |
957 |
UnionComponentCode smallint NOT NULL COMMENT '所属構成キー', |
958 |
ComponentCode smallint NOT NULL COMMENT '構成キー', |
959 |
ItemCode smallint NOT NULL COMMENT '工種キー', |
960 |
SelectComponent smallint NOT NULL COMMENT '選択構成キー', |
961 |
PageTitle varchar(120) NOT NULL COMMENT 'ページ表示名', |
962 |
DetailLineCount tinyint NOT NULL COMMENT '明細行番号', |
963 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
964 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
965 |
PRIMARY KEY (ConstructionCode, PageCount) |
966 |
) COMMENT = '積算見積ページデータ'; |
967 |
|
968 |
|
969 |
-- 積算見積データ明細
|
970 |
CREATE TABLE EstimateDataDetail |
971 |
( |
972 |
ConstructionCode decimal(10,0) NOT NULL COMMENT '工事コード', |
973 |
PageCount year(4) NOT NULL COMMENT 'ページ番号', |
974 |
LineCount tinyint NOT NULL COMMENT '行番号', |
975 |
DataType decimal(1) NOT NULL COMMENT 'データ種別', |
976 |
ComponentCode smallint NOT NULL COMMENT '構成キー', |
977 |
ItemCode smallint NOT NULL COMMENT '工種キー', |
978 |
SpecCode smallint NOT NULL COMMENT '作業キー', |
979 |
ItemName varchar(120) COMMENT '作業名称', |
980 |
SpecName varchar(120) COMMENT '作業/品質・形状・寸法', |
981 |
Unitcount decimal(8,2) NOT NULL COMMENT '数量', |
982 |
UnitName varchar(30) COMMENT '単位名称', |
983 |
UnitPrice decimal(9,2) NOT NULL COMMENT '単価', |
984 |
LineTotal decimal(12,2) NOT NULL COMMENT '金額', |
985 |
note varchar(60) COMMENT '備考', |
986 |
CompanyCode decimal(8,0) NOT NULL COMMENT '協力会社コード', |
987 |
MyExpensesFlg decimal(1) NOT NULL COMMENT '自社経費フラグ', |
988 |
InputFlg decimal(1) COMMENT '入力フラグ', |
989 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
990 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
991 |
PRIMARY KEY (ConstructionCode, PageCount, LineCount) |
992 |
) COMMENT = '積算見積データ明細'; |
993 |
|
994 |
|
995 |
-- 経費率マスタ
|
996 |
CREATE TABLE ExpensesMaster |
997 |
( |
998 |
DivisionCode smallint NOT NULL COMMENT '工事種別コード', |
999 |
NameCode smallint NOT NULL COMMENT '経費名称コード', |
1000 |
DisplayOrder smallint NOT NULL COMMENT '表示順', |
1001 |
ExpensesRatio decimal(4,2) NOT NULL COMMENT '経費率', |
1002 |
DeleteFlg decimal(1,0) NOT NULL COMMENT '削除フラグ', |
1003 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
1004 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
1005 |
PRIMARY KEY (DivisionCode, NameCode) |
1006 |
) COMMENT = '経費率マスタ'; |
1007 |
|
1008 |
|
1009 |
-- 会社休日マスタ
|
1010 |
CREATE TABLE HolidayCalenderMaster |
1011 |
( |
1012 |
Holiday date NOT NULL COMMENT '休日', |
1013 |
BusinessYear year(4) NOT NULL COMMENT '営業年度', |
1014 |
TargetMonth year(2) NOT NULL COMMENT '該当月', |
1015 |
TargetDay year(2) NOT NULL COMMENT '該当日', |
1016 |
PRIMARY KEY (Holiday) |
1017 |
) COMMENT = '会社休日マスタ'; |
1018 |
|
1019 |
|
1020 |
-- 入力時検索履歴
|
1021 |
CREATE TABLE InputSearchLogData |
1022 |
( |
1023 |
ConstructionCode decimal(10,0) NOT NULL COMMENT '工事コード', |
1024 |
UsedProcessNo tinyint NOT NULL COMMENT '使用機能番号', |
1025 |
DisplayOrder decimal(5,0) NOT NULL COMMENT '表示順', |
1026 |
DataType decimal(1) NOT NULL COMMENT 'データ種別', |
1027 |
InputCode int COMMENT '入力コード', |
1028 |
PRIMARY KEY (ConstructionCode, UsedProcessNo, DisplayOrder) |
1029 |
) COMMENT = '入力時検索履歴'; |
1030 |
|
1031 |
|
1032 |
-- 掲示板メッセージ
|
1033 |
CREATE TABLE MessageBoardData |
1034 |
( |
1035 |
RecordNumber decimal(6,0) NOT NULL COMMENT 'レコード番号', |
1036 |
BranchNumber decimal(3,0) NOT NULL COMMENT 'レコード枝番', |
1037 |
FromCode decimal(8,0) NOT NULL COMMENT '書込み者コード', |
1038 |
FromName varchar(60) NOT NULL COMMENT '書込み者', |
1039 |
MessageTitile varchar(100) COMMENT '伝言タイトル', |
1040 |
MessageContent varchar(1333) NOT NULL COMMENT '伝言内容', |
1041 |
LinkType year(2) NOT NULL COMMENT 'リンク動作タイプ', |
1042 |
LinkMessage varchar(200) COMMENT 'リンク文字列', |
1043 |
LinkCode varchar(30) COMMENT 'リンクキー', |
1044 |
WritingDate date NOT NULL COMMENT '書込み日時', |
1045 |
PersonCode decimal(8,0) NOT NULL COMMENT '書込み担当者コード', |
1046 |
ShareFlag year(2) NOT NULL COMMENT '管理者対象フラグ', |
1047 |
MessageColor varchar(8) COMMENT '文字色', |
1048 |
BackColor varchar(8) COMMENT 'バックカラー', |
1049 |
MessageFlag decimal(1) NOT NULL COMMENT 'メッセージフラグ', |
1050 |
EntryDate datetime COMMENT '登録日付', |
1051 |
UpdateDate datetime COMMENT '更新日付', |
1052 |
PRIMARY KEY (RecordNumber, BranchNumber) |
1053 |
) COMMENT = '掲示板メッセージ'; |
1054 |
|
1055 |
|
1056 |
-- 掲示板対象者テーブル
|
1057 |
CREATE TABLE MessageBoardTerget |
1058 |
( |
1059 |
RecordNumber decimal(6,0) NOT NULL COMMENT 'レコード番号', |
1060 |
BranchNumber decimal(3,0) NOT NULL COMMENT 'レコード枝番', |
1061 |
SeqNum tinyint NOT NULL COMMENT '順番', |
1062 |
ToCode decimal(8,0) NOT NULL COMMENT '対象者コード', |
1063 |
ToName varchar(60) NOT NULL COMMENT '対象者', |
1064 |
EntryDate datetime COMMENT '登録日付', |
1065 |
UpdateDate datetime COMMENT '更新日付', |
1066 |
PRIMARY KEY (RecordNumber, BranchNumber, SeqNum) |
1067 |
) COMMENT = '掲示板対象者テーブル'; |
1068 |
|
1069 |
|
1070 |
-- 掲示板メッセージ閲覧履歴
|
1071 |
CREATE TABLE MessageBrowsingHistory |
1072 |
( |
1073 |
RecordNumber decimal(6,0) NOT NULL COMMENT 'レコード番号', |
1074 |
BranchNumber decimal(3,0) NOT NULL COMMENT 'レコード枝番', |
1075 |
SeqNum tinyint NOT NULL COMMENT '順番', |
1076 |
BrowsingCode decimal(8,0) NOT NULL COMMENT '閲覧者コード', |
1077 |
BrowsingDate date NOT NULL COMMENT '閲覧日付', |
1078 |
EntryDate datetime COMMENT '登録日付', |
1079 |
UpdateDate datetime COMMENT '更新日付', |
1080 |
PRIMARY KEY (RecordNumber, BranchNumber, SeqNum) |
1081 |
) COMMENT = '掲示板メッセージ閲覧履歴'; |
1082 |
|
1083 |
|
1084 |
-- 発注者マスタ
|
1085 |
CREATE TABLE OrderersMaster |
1086 |
( |
1087 |
OrderCotegory smallint NOT NULL COMMENT '発注者区分', |
1088 |
OrderersCode smallint NOT NULL COMMENT '発注者コード', |
1089 |
DisplayOrder decimal(5,0) NOT NULL COMMENT '表示順', |
1090 |
CorporateStatusName varchar(100) COMMENT '法人格名称', |
1091 |
CorporateStatusPoint decimal(1) COMMENT '法人格名称位置', |
1092 |
OrderersName1 varchar(60) DEFAULT '' NOT NULL COMMENT '発注者名1', |
1093 |
OrderersName2 varchar(60) COMMENT '発注者名2', |
1094 |
ZipCode varchar(8) COMMENT '郵便番号', |
1095 |
Address1 varchar(60) COMMENT '住所1', |
1096 |
Address2 varchar(60) DEFAULT '' COMMENT '住所2', |
1097 |
Address3 varchar(60) COMMENT '住所3', |
1098 |
PhoneNumber varchar(13) DEFAULT '' COMMENT '電話番号', |
1099 |
FaxNumber varchar(13) DEFAULT '' COMMENT 'FAX番号', |
1100 |
Note varchar(300) DEFAULT '' COMMENT '備考', |
1101 |
DeleteFlg decimal(1) NOT NULL COMMENT '削除フラグ', |
1102 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
1103 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
1104 |
PRIMARY KEY (OrderCotegory, OrderersCode) |
1105 |
) COMMENT = '発注者マスタ'; |
1106 |
|
1107 |
|
1108 |
-- 受注金額データ
|
1109 |
CREATE TABLE OrdersPriceData |
1110 |
( |
1111 |
ConstructionCode int NOT NULL COMMENT '工事番号', |
1112 |
ChangeNo tinyint NOT NULL COMMENT '変更番号', |
1113 |
ChangeDate date NOT NULL COMMENT '変更日', |
1114 |
ChangePersonCode decimal(8,0) NOT NULL COMMENT '変更者コード', |
1115 |
ChangePersonName varchar(60) COMMENT '変更者名', |
1116 |
BeforeValue decimal(14,2) NOT NULL COMMENT '変更前税抜受注金額', |
1117 |
BeforeValueInTax decimal(14,2) NOT NULL COMMENT '変更前税込受注金額', |
1118 |
AfterValue decimal(14,2) NOT NULL COMMENT '変更後税抜受注金額', |
1119 |
AfterValueInTax decimal(14,2) NOT NULL COMMENT '変更後税込受注金額', |
1120 |
ChangeComment varchar(200) COMMENT '変更理由', |
1121 |
EntryDate datetime COMMENT '登録年月日', |
1122 |
UpdateDate datetime COMMENT '更新年月日', |
1123 |
PRIMARY KEY (ConstructionCode, ChangeNo) |
1124 |
) COMMENT = '受注金額データ'; |
1125 |
|
1126 |
|
1127 |
-- 担当者対象部署マスタ
|
1128 |
CREATE TABLE PersonDepartmentMaster |
1129 |
( |
1130 |
PersonCode decimal(8,0) NOT NULL COMMENT '担当者コード', |
1131 |
DepartmentCode smallint NOT NULL COMMENT '対象部署コード', |
1132 |
AffiliationFlg decimal(1) NOT NULL COMMENT '所属フラグ', |
1133 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
1134 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
1135 |
PRIMARY KEY (PersonCode, DepartmentCode) |
1136 |
) COMMENT = '担当者対象部署マスタ'; |
1137 |
|
1138 |
|
1139 |
-- 担当者マスタ
|
1140 |
CREATE TABLE PersonInChargeMaster |
1141 |
( |
1142 |
PersonCode decimal(8,0) NOT NULL COMMENT '担当者コード', |
1143 |
DisplayOrder decimal(8,0) NOT NULL COMMENT '表示順', |
1144 |
PersonName varchar(60) DEFAULT '' NOT NULL COMMENT '担当者名', |
1145 |
StartDate date NOT NULL COMMENT '使用開始年月日', |
1146 |
EndDate date COMMENT '使用終了年月日', |
1147 |
PassWord varchar(16) COMMENT 'パスワード', |
1148 |
SecurityManagement decimal(1) NOT NULL COMMENT '機密区分', |
1149 |
SecCode year(2) NOT NULL COMMENT '保護区分番号', |
1150 |
MsgBackColor varchar(8) COMMENT 'メッセージ背景色', |
1151 |
DisplayString varchar(20) COMMENT '表示・印刷名称', |
1152 |
DepartmentCode smallint COMMENT '部署コード', |
1153 |
MonthlySalary decimal(11,3) NOT NULL COMMENT '月給金額', |
1154 |
YearSalary decimal(12,3) NOT NULL COMMENT '年俸金額', |
1155 |
Qualification varchar(120) COMMENT '資格入力欄', |
1156 |
SealPrintName varchar(5) COMMENT '印鑑表示名', |
1157 |
EmployeeClassFlg decimal(1) NOT NULL COMMENT '社員区分', |
1158 |
LedgerFlg decimal(1) NOT NULL COMMENT '台帳計算対象フラグ', |
1159 |
DeleteFlg decimal(1,0) NOT NULL COMMENT '削除フラグ', |
1160 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
1161 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
1162 |
PRIMARY KEY (PersonCode) |
1163 |
) COMMENT = '担当者マスタ'; |
1164 |
|
1165 |
|
1166 |
-- 担当者給与マスタ
|
1167 |
CREATE TABLE PersonSalaryMaster |
1168 |
( |
1169 |
PersonCode decimal(8,0) NOT NULL COMMENT '担当者コード', |
1170 |
StartDate date NOT NULL COMMENT '使用開始年月日', |
1171 |
MonthlySalary decimal(11,3) NOT NULL COMMENT '月給金額', |
1172 |
YearSalary decimal(12,3) NOT NULL COMMENT '年俸金額', |
1173 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
1174 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
1175 |
PRIMARY KEY (PersonCode, StartDate) |
1176 |
) COMMENT = '担当者給与マスタ'; |
1177 |
|
1178 |
|
1179 |
-- 指示事項データ
|
1180 |
CREATE TABLE PointingOutComment |
1181 |
( |
1182 |
ConstructionCode decimal(10,0) NOT NULL COMMENT '工事コード', |
1183 |
ProcessNo tinyint NOT NULL COMMENT '処理番号(画面番号)', |
1184 |
SeqNo tinyint NOT NULL COMMENT '順序', |
1185 |
PageCount year(4) NOT NULL COMMENT 'ページ番号', |
1186 |
PersonCode decimal(8,0) NOT NULL COMMENT '記入者コード', |
1187 |
DrowColor varchar(8) COMMENT '描画色', |
1188 |
CommentMessage varchar(1000) COMMENT 'メッセージ', |
1189 |
StartPointX year(4) NOT NULL COMMENT '指摘項目位置X', |
1190 |
StartPointY year(4) NOT NULL COMMENT '指摘項目位置Y', |
1191 |
CurrentPointX year(4) NOT NULL COMMENT '初期位置X', |
1192 |
CurrentPointY year(4) NOT NULL COMMENT '初期位置Y', |
1193 |
CurrentWidth year(4) NOT NULL COMMENT '表示サイズWidth', |
1194 |
CurrentHeight year(4) NOT NULL COMMENT '表示サイズHeigth', |
1195 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
1196 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
1197 |
PRIMARY KEY (ConstructionCode, ProcessNo, SeqNo) |
1198 |
) COMMENT = '指示事項データ'; |
1199 |
|
1200 |
|
1201 |
-- 発注者打ち合わせ議事録データ
|
1202 |
CREATE TABLE ProceedingsData |
1203 |
( |
1204 |
PersonCode decimal(8,0) NOT NULL COMMENT '作成者コード', |
1205 |
ProceedingsDataDate date NOT NULL COMMENT '議事録作成日', |
1206 |
ConstructionCode int NOT NULL COMMENT '工事番号', |
1207 |
StartMeetingTime datetime NOT NULL COMMENT '会議時間開始', |
1208 |
EndMeetingTime datetime NOT NULL COMMENT '会議時間終了', |
1209 |
MeetingPalce1 varchar(100) COMMENT '打合せ場所1', |
1210 |
MeetingPalce2 varchar(100) COMMENT '打合せ場所2', |
1211 |
MeetingPalce3 varchar(100) COMMENT '打合せ場所3', |
1212 |
EntryDate datetime NOT NULL COMMENT '登録年月日', |
1213 |
UpdateDate datetime NOT NULL COMMENT '更新年月日', |
1214 |
PRIMARY KEY (PersonCode, ProceedingsDataDate, ConstructionCode) |
1215 |
) COMMENT = '発注者打ち合わせ議事録データ'; |
1216 |
|
1217 |
|
1218 |
-- 発注者打ち合わせ議事録データ(出席者)
|
1219 |
CREATE TABLE ProceedingsDataAttendee |
1220 |
( |
1221 |
PersonCode decimal(8,0) NOT NULL COMMENT '作成者コード', |
1222 |
ProceedingsDataDate date NOT NULL COMMENT '議事録作成日', |
1223 |
ConstructionCode int NOT NULL COMMENT '工事番号', |
1224 |
SeqNo tinyint NOT NULL COMMENT 'データ行番号', |
1225 |
Department varchar(100) COMMENT '出席者所属', |
1226 |
AttendeeName varchar(100) COMMENT '出席者氏名', |
1227 |
EntryDate datetime NOT NULL COMMENT '登録年月日', |
1228 |
UpdateDate datetime NOT NULL COMMENT '更新年月日', |
1229 |
PRIMARY KEY (PersonCode, ProceedingsDataDate, ConstructionCode, SeqNo) |
1230 |
) COMMENT = '発注者打ち合わせ議事録データ(出席者)'; |
1231 |
|
1232 |
|
1233 |
-- 発注者打ち合わせ議事録データ(明細)
|
1234 |
CREATE TABLE ProceedingsDataDetail |
1235 |
( |
1236 |
PersonCode decimal(8,0) NOT NULL COMMENT '作成者コード', |
1237 |
ProceedingsDataDate date NOT NULL COMMENT '議事録作成日', |
1238 |
ConstructionCode int NOT NULL COMMENT '工事番号', |
1239 |
SeqNo tinyint NOT NULL COMMENT 'データ行番号', |
1240 |
TitileNo tinyint COMMENT '議題番号', |
1241 |
Titile varchar(100) COMMENT '議題', |
1242 |
ContentsText varchar(200) COMMENT '内容', |
1243 |
EntryDate datetime NOT NULL COMMENT '登録年月日', |
1244 |
UpdateDate datetime NOT NULL COMMENT '更新年月日', |
1245 |
PRIMARY KEY (PersonCode, ProceedingsDataDate, ConstructionCode, SeqNo) |
1246 |
) COMMENT = '発注者打ち合わせ議事録データ(明細)'; |
1247 |
|
1248 |
|
1249 |
-- 承認データ
|
1250 |
CREATE TABLE ProcessApproval |
1251 |
( |
1252 |
ConstructionCode decimal(10,0) NOT NULL COMMENT '工事番号', |
1253 |
ApprovalCode tinyint NOT NULL COMMENT '承認機能番号', |
1254 |
OrderNo year(2) NOT NULL COMMENT '受付番号', |
1255 |
SeqNo year(2) NOT NULL COMMENT '枝番', |
1256 |
PersonCode decimal(8,0) NOT NULL COMMENT '申請・承認者コード', |
1257 |
PetitionApprovalDate date NOT NULL COMMENT '申請・承認日付', |
1258 |
ApprovalLimitDates date NOT NULL COMMENT '承認希望日', |
1259 |
ApprovalStatus decimal(1) NOT NULL COMMENT '承認状態', |
1260 |
InputComment varchar(300) COMMENT 'コメント', |
1261 |
EntryDate datetime NOT NULL COMMENT '登録年月日', |
1262 |
UpdateDate datetime NOT NULL COMMENT '更新年月日', |
1263 |
PRIMARY KEY (ConstructionCode, ApprovalCode, OrderNo, SeqNo) |
1264 |
) COMMENT = '承認データ'; |
1265 |
|
1266 |
|
1267 |
-- 承認明細データ
|
1268 |
CREATE TABLE ProcessApprovalDetail |
1269 |
( |
1270 |
ConstructionCode decimal(10,0) NOT NULL COMMENT '工事番号', |
1271 |
ApprovalCode tinyint NOT NULL COMMENT '承認機能番号', |
1272 |
OrderNo year(2) NOT NULL COMMENT '受付番号', |
1273 |
SerialNo year(2) NOT NULL COMMENT '枝番', |
1274 |
LinkCode int NOT NULL COMMENT 'リンク情報', |
1275 |
EntryDate datetime NOT NULL COMMENT '登録年月日', |
1276 |
UpdateDate datetime NOT NULL COMMENT '更新年月日', |
1277 |
PRIMARY KEY (ConstructionCode, ApprovalCode, OrderNo, SerialNo) |
1278 |
) COMMENT = '承認明細データ'; |
1279 |
|
1280 |
|
1281 |
-- 起動対象マスタ
|
1282 |
CREATE TABLE ProcessExcuteMaster |
1283 |
( |
1284 |
SecCode year(2) NOT NULL COMMENT '保護区分番号', |
1285 |
ExecCode year(4) NOT NULL COMMENT '起動処理番号', |
1286 |
EditFlg decimal(1) NOT NULL COMMENT '編集フラグ', |
1287 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
1288 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
1289 |
PRIMARY KEY (SecCode, ExecCode) |
1290 |
) COMMENT = '起動対象マスタ'; |
1291 |
|
1292 |
|
1293 |
-- 注文書データ
|
1294 |
CREATE TABLE PurchaseOrder |
1295 |
( |
1296 |
ConstructionCode int NOT NULL COMMENT '工事番号', |
1297 |
SeqNo tinyint NOT NULL COMMENT '注文書枝番', |
1298 |
CompanyCode decimal(8,0) NOT NULL COMMENT '協力会社コード', |
1299 |
CreateDate date COMMENT '作成日付', |
1300 |
OrderPrice decimal(12,2) NOT NULL COMMENT '発注金額', |
1301 |
LastRowStringDate date NOT NULL COMMENT '最終行表示日付', |
1302 |
OrderSheetType decimal(1) NOT NULL COMMENT '簡易・本式フラグ', |
1303 |
PaymentTerms decimal(1) NOT NULL COMMENT '支払い条件', |
1304 |
CashRatio decimal(4,1) NOT NULL COMMENT '現金割合(%)', |
1305 |
BillPeriod year(4) NOT NULL COMMENT '手形期間', |
1306 |
PrePayments decimal(1) NOT NULL COMMENT '前金払', |
1307 |
PrePaymentsDays decimal(3,0) NOT NULL COMMENT '前金払日数', |
1308 |
PrePaymentsPrice decimal(12,2) NOT NULL COMMENT '前金払金額', |
1309 |
PartialPayment decimal(1) NOT NULL COMMENT '部分払', |
1310 |
PartialPaymentMounth year(2) NOT NULL COMMENT '部分払締切月', |
1311 |
PartialPaymentDay1 year(2) NOT NULL COMMENT '部分払締切日', |
1312 |
PartialPaymentDay2 year(2) NOT NULL COMMENT '部分払支払日', |
1313 |
PartialPaymentPrice decimal(12,2) NOT NULL COMMENT '部分払金額', |
1314 |
CompletionPayment decimal(1) NOT NULL COMMENT '引渡し時の支払', |
1315 |
CompletionPaymentDays tinyint NOT NULL COMMENT '引渡し時の支払日数', |
1316 |
CompletionPaymentPrice decimal(12,2) NOT NULL COMMENT '引渡し時の支払金額', |
1317 |
LeadEngineerCode decimal(8,0) COMMENT '主任技術者コード', |
1318 |
LeadEngineerName varchar(60) COMMENT 'LeadEngineerName', |
1319 |
SafetyOfficerCode decimal(8,0) COMMENT '安全管理者コード', |
1320 |
SafetyOfficerName varchar(60) COMMENT '安全管理者名', |
1321 |
WorkersCount tinyint COMMENT '作業員数', |
1322 |
PrintoutDate date NOT NULL COMMENT '印刷年月日', |
1323 |
EntryDate datetime NOT NULL COMMENT '登録年月日', |
1324 |
UpdateDate datetime NOT NULL COMMENT '更新年月日', |
1325 |
PRIMARY KEY (ConstructionCode, SeqNo) |
1326 |
) COMMENT = '注文書データ'; |
1327 |
|
1328 |
|
1329 |
-- 注文書明細データ
|
1330 |
CREATE TABLE PurchaseOrderDetail |
1331 |
( |
1332 |
ConstructionCode int NOT NULL COMMENT '工事番号', |
1333 |
SeqNo tinyint NOT NULL COMMENT '注文書枝番', |
1334 |
GroupCount decimal(1) NOT NULL COMMENT 'グループ番号', |
1335 |
LineCount tinyint NOT NULL COMMENT '行番号', |
1336 |
ComponentCode smallint NOT NULL COMMENT '構成キー', |
1337 |
ItemCode smallint NOT NULL COMMENT '工種キー', |
1338 |
FirstString varchar(120) COMMENT '工種・品名', |
1339 |
SecondString varchar(120) COMMENT '内容内訳', |
1340 |
UnitCount decimal(8,2) NOT NULL COMMENT '数量', |
1341 |
UnitName varchar(30) COMMENT '単位', |
1342 |
UnitPrice decimal(10,2) NOT NULL COMMENT '単価', |
1343 |
OrdersLinePrice decimal(12,2) COMMENT '金額', |
1344 |
SourceCode int NOT NULL COMMENT '予算作成時工事番号', |
1345 |
EntryDate datetime NOT NULL COMMENT '登録年月日', |
1346 |
UpdateDate datetime NOT NULL COMMENT '更新年月日', |
1347 |
PRIMARY KEY (ConstructionCode, SeqNo, GroupCount, LineCount) |
1348 |
) COMMENT = '注文書明細データ'; |
1349 |
|
1350 |
|
1351 |
-- 売上グラフデータ
|
1352 |
CREATE TABLE SalesGraphData |
1353 |
( |
1354 |
GraphDataCode decimal(8,0) NOT NULL COMMENT 'グラフデータコード', |
1355 |
ConstructionPeriod year(4) NOT NULL COMMENT '事業期', |
1356 |
SalesDataDays date NOT NULL COMMENT '売上年月', |
1357 |
DisplayOrder decimal(8,0) NOT NULL COMMENT '表示順', |
1358 |
DataName varchar(100) NOT NULL COMMENT 'データ表示名称', |
1359 |
SalesAmount int NOT NULL COMMENT '売上データ', |
1360 |
AdministrativeExpense int NOT NULL COMMENT '販管・部署経費', |
1361 |
GrossProfit int NOT NULL COMMENT '粗利益', |
1362 |
NetIncome int NOT NULL COMMENT '純利益(損益)', |
1363 |
EntryDate datetime NOT NULL COMMENT '登録年月日', |
1364 |
UpdateDate datetime NOT NULL COMMENT '更新年月日', |
1365 |
PRIMARY KEY (GraphDataCode, ConstructionPeriod, SalesDataDays) |
1366 |
) COMMENT = '売上グラフデータ'; |
1367 |
|
1368 |
|
1369 |
-- 保護区分マスタ
|
1370 |
CREATE TABLE SecurityMaster |
1371 |
( |
1372 |
SecCode year(2) NOT NULL COMMENT '保護区分番号', |
1373 |
DisplayOrder smallint NOT NULL COMMENT '表示順', |
1374 |
SecName varchar(60) NOT NULL COMMENT '保護区分名称', |
1375 |
SecRank decimal(1) NOT NULL COMMENT '保護区分ランク', |
1376 |
SecRange decimal(1) NOT NULL COMMENT '保護区分範囲', |
1377 |
GeneralAffairs decimal(1) NOT NULL COMMENT '総務業務フラグ', |
1378 |
SelectBackColor varchar(8) NOT NULL COMMENT '選択背景色', |
1379 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
1380 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
1381 |
PRIMARY KEY (SecCode) |
1382 |
) COMMENT = '保護区分マスタ'; |
1383 |
|
1384 |
|
1385 |
-- 協力会社工種マスタ
|
1386 |
CREATE TABLE SubContractorItemMaster |
1387 |
( |
1388 |
ItemCode smallint NOT NULL COMMENT '工種キー', |
1389 |
DisplayOrder smallint NOT NULL COMMENT '表示順', |
1390 |
ItemName varchar(120) DEFAULT '' NOT NULL COMMENT '工種名称', |
1391 |
DeleteFlg decimal(1) NOT NULL COMMENT '削除フラグ', |
1392 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
1393 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
1394 |
PRIMARY KEY (ItemCode) |
1395 |
) COMMENT = '協力会社工種マスタ'; |
1396 |
|
1397 |
|
1398 |
-- 協力会社職種マスタ
|
1399 |
CREATE TABLE SubContractorJobCategory |
1400 |
( |
1401 |
JobCategoryCode smallint NOT NULL COMMENT '職種キー', |
1402 |
DisplayOrder smallint NOT NULL COMMENT '表示順', |
1403 |
JobCategoryName varchar(120) DEFAULT '' NOT NULL COMMENT '職種名称', |
1404 |
DeleteFlg decimal(1) NOT NULL COMMENT '削除フラグ', |
1405 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
1406 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
1407 |
PRIMARY KEY (JobCategoryCode) |
1408 |
) COMMENT = '協力会社職種マスタ'; |
1409 |
|
1410 |
|
1411 |
-- 協力会社施工工種データ
|
1412 |
CREATE TABLE SubContractorJobItem |
1413 |
( |
1414 |
CompanyCode decimal(8,0) NOT NULL COMMENT '協力会社コード', |
1415 |
ItemCode smallint NOT NULL COMMENT '工種キー', |
1416 |
DisplayOrder decimal(8,0) NOT NULL COMMENT '表示順', |
1417 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
1418 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
1419 |
PRIMARY KEY (CompanyCode, ItemCode) |
1420 |
) COMMENT = '協力会社施工工種データ'; |
1421 |
|
1422 |
|
1423 |
-- 協力会社職種リンクマスタ
|
1424 |
CREATE TABLE SubContractorJobLink |
1425 |
( |
1426 |
CompanyCode decimal(8,0) NOT NULL COMMENT '協力会社コード', |
1427 |
JobCategoryCode smallint NOT NULL COMMENT '職種キー', |
1428 |
DisplayOrder decimal(8,0) NOT NULL COMMENT '表示順', |
1429 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
1430 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
1431 |
PRIMARY KEY (CompanyCode, JobCategoryCode) |
1432 |
) COMMENT = '協力会社職種リンクマスタ'; |
1433 |
|
1434 |
|
1435 |
-- 協力会社マスタ
|
1436 |
CREATE TABLE SubContractorMaster |
1437 |
( |
1438 |
CompanyCode decimal(8,0) NOT NULL COMMENT '協力会社コード', |
1439 |
DisplayOrder decimal(5,0) NOT NULL COMMENT '表示順', |
1440 |
CorporateStatusName varchar(40) DEFAULT '' COMMENT '法人格名称', |
1441 |
CorporateStatusPoint decimal(1) NOT NULL COMMENT '法人格名称位置', |
1442 |
CompanyName varchar(100) DEFAULT '' NOT NULL COMMENT '協力会社名', |
1443 |
CEOPositionName varchar(60) DEFAULT '' COMMENT '代表者役職名', |
1444 |
CEOName varchar(60) DEFAULT '' COMMENT '代表者氏名', |
1445 |
ContactPersonName varchar(60) COMMENT '担当者氏名', |
1446 |
ZipCode varchar(8) COMMENT '郵便番号', |
1447 |
Address1 varchar(60) COMMENT '住所1', |
1448 |
Address2 varchar(60) DEFAULT '' COMMENT '住所2', |
1449 |
Address3 varchar(60) COMMENT '住所3', |
1450 |
CellPhoneNumber varchar(13) COMMENT '携帯電話番号', |
1451 |
MailAddress varchar(257) COMMENT 'メールアドレス', |
1452 |
PhoneNumber varchar(13) DEFAULT '' COMMENT '電話番号', |
1453 |
FaxNumber varchar(13) DEFAULT '' COMMENT 'FAX番号', |
1454 |
JapaneseSyllabary varchar(2) COMMENT '50音読み', |
1455 |
StartDate date NOT NULL COMMENT '取引開始年月日', |
1456 |
Note varchar(300) DEFAULT '' COMMENT '備考', |
1457 |
labourKind decimal(1) NOT NULL COMMENT '支払い通常・手間区分', |
1458 |
DeleteFlg decimal(1) DEFAULT 0 NOT NULL COMMENT '削除フラグ', |
1459 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
1460 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
1461 |
PRIMARY KEY (CompanyCode) |
1462 |
) COMMENT = '協力会社マスタ'; |
1463 |
|
1464 |
|
1465 |
-- 仕入先マスタ
|
1466 |
CREATE TABLE SuppliersMaster |
1467 |
( |
1468 |
SuppliersCode smallint NOT NULL COMMENT '仕入先コード', |
1469 |
DisplayOrder decimal(5,0) NOT NULL COMMENT '表示順', |
1470 |
SuppliersName1 varchar(60) DEFAULT '' NOT NULL COMMENT '仕入先名1', |
1471 |
SuppliersName2 varchar(60) COMMENT '仕入先名2', |
1472 |
ZipCode varchar(8) COMMENT '郵便番号', |
1473 |
Address1 varchar(60) COMMENT '住所1', |
1474 |
Address2 varchar(60) DEFAULT '' COMMENT '住所2', |
1475 |
Address3 varchar(60) COMMENT '住所3', |
1476 |
PhoneNumber varchar(13) DEFAULT '' COMMENT '電話番号', |
1477 |
FaxNumber varchar(13) DEFAULT '' COMMENT 'FAX番号', |
1478 |
Note varchar(300) DEFAULT '' COMMENT '備考', |
1479 |
DeleteFlg decimal(1) NOT NULL COMMENT '削除フラグ', |
1480 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
1481 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
1482 |
PRIMARY KEY (SuppliersCode) |
1483 |
) COMMENT = '仕入先マスタ'; |
1484 |
|
1485 |
|
1486 |
-- システム起動確認データ
|
1487 |
CREATE TABLE SystemExecute |
1488 |
( |
1489 |
PrimaryCode tinyint NOT NULL COMMENT 'キー項目', |
1490 |
TargetDate date NOT NULL COMMENT '起動日付', |
1491 |
SystemVersion decimal(10,0) COMMENT '本体・環境バージョン', |
1492 |
UpDateCopyVersion decimal(10,0) COMMENT 'コピーバージョン', |
1493 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
1494 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
1495 |
PRIMARY KEY (PrimaryCode) |
1496 |
) COMMENT = 'システム起動確認データ'; |
1497 |
|
1498 |
|
1499 |
-- 管理マスタ
|
1500 |
CREATE TABLE SystemMaster |
1501 |
( |
1502 |
SystemCode tinyint NOT NULL COMMENT '会社コード', |
1503 |
CompanyName1 varchar(60) DEFAULT '' NOT NULL COMMENT '会社名1', |
1504 |
CompanyName2 varchar(60) DEFAULT '' COMMENT '会社名2', |
1505 |
CEOName varchar(60) DEFAULT '' NOT NULL COMMENT '代表者氏名', |
1506 |
CEOPositionName varchar(60) DEFAULT '' COMMENT '代表者役職名', |
1507 |
ZipCode varchar(8) NOT NULL COMMENT '郵便番号', |
1508 |
Address1 varchar(60) NOT NULL COMMENT '住所1', |
1509 |
Address2 varchar(60) DEFAULT '' COMMENT '住所2', |
1510 |
Address3 varchar(60) COMMENT '住所3', |
1511 |
PhoneNumber varchar(13) DEFAULT '' NOT NULL COMMENT '電話番号', |
1512 |
FaxNumber varchar(13) DEFAULT '' COMMENT 'FAX番号', |
1513 |
ConstructionExpenses decimal(4,2) NOT NULL COMMENT '工事部経費', |
1514 |
OfficeExpenses decimal(4,2) NOT NULL COMMENT '事務所経費', |
1515 |
OperatingExpenses decimal(4,2) NOT NULL COMMENT '営業経費', |
1516 |
ConsumptionTax decimal(4,2) NOT NULL COMMENT '消費税', |
1517 |
ExcelSavePath varchar(120) COMMENT 'Excel保存パス', |
1518 |
BusinessPeriod year(4) NOT NULL COMMENT '現在営業期数', |
1519 |
ConstructionYear year(4) NOT NULL COMMENT '現在工事年度', |
1520 |
BusinessBeginningDate varchar(5) NOT NULL COMMENT '営業期期首日', |
1521 |
ConstructionBeginningDate varchar(5) NOT NULL COMMENT '工事年度期首日', |
1522 |
ConstructionNoBase decimal(1) NOT NULL COMMENT '工事番号基準値', |
1523 |
SloganString1 varchar(100) COMMENT '標語1', |
1524 |
SloganString2 varchar(100) COMMENT '標語2', |
1525 |
SloganString3 varchar(100) COMMENT '標語3', |
1526 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
1527 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
1528 |
PRIMARY KEY (SystemCode) |
1529 |
) COMMENT = '管理マスタ'; |
1530 |
|
1531 |
|
1532 |
-- 期限マスタ
|
1533 |
CREATE TABLE TermMaster |
1534 |
( |
1535 |
ConstructionStatusFlg decimal(2,0) NOT NULL COMMENT '工事状態フラグ', |
1536 |
FieldNo year(2) NOT NULL COMMENT 'チェック対象フィールド番号', |
1537 |
SeqNo year(2) NOT NULL COMMENT '枝番', |
1538 |
DisplayOrder year(2) NOT NULL COMMENT '表示順', |
1539 |
CheckSchdule decimal(1) NOT NULL COMMENT 'チェックタイミング', |
1540 |
TermDays year(2) NOT NULL COMMENT '経過日', |
1541 |
SendTitile varchar(100) COMMENT 'タイトル', |
1542 |
SendMessage varchar(100) COMMENT 'メッセージ', |
1543 |
BackColor varchar(8) COMMENT '背景色', |
1544 |
ForeColor varchar(8) COMMENT '文字色', |
1545 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
1546 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
1547 |
PRIMARY KEY (ConstructionStatusFlg, FieldNo, SeqNo) |
1548 |
) COMMENT = '期限マスタ'; |
1549 |
|
1550 |
|
1551 |
-- 単位マスタ
|
1552 |
CREATE TABLE UnitMaster |
1553 |
( |
1554 |
UnitKey smallint NOT NULL COMMENT '単位キー', |
1555 |
DisplayOrder smallint NOT NULL COMMENT '表示順', |
1556 |
UnitName varchar(30) NOT NULL COMMENT '単位名称', |
1557 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
1558 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
1559 |
PRIMARY KEY (UnitKey) |
1560 |
) COMMENT = '単位マスタ'; |
1561 |
|
1562 |
|
1563 |
-- 車両マスタ
|
1564 |
CREATE TABLE VehicleMaster |
1565 |
( |
1566 |
VehicleCode smallint NOT NULL COMMENT '車両コード', |
1567 |
displayOrder smallint NOT NULL COMMENT '表示順', |
1568 |
VehicleName varchar(100) NOT NULL COMMENT '車両名称', |
1569 |
RegistrationNumber varchar(30) COMMENT '登録番号', |
1570 |
IdentificationNumber varchar(30) COMMENT '車体番号', |
1571 |
ModelCode varchar(30) COMMENT '型式', |
1572 |
DepartmentCode smallint NOT NULL COMMENT '管理部署', |
1573 |
VehicleScheduleFlg decimal(1) NOT NULL COMMENT '車両予約表示フラグ', |
1574 |
PurchaseDate date COMMENT '購入日', |
1575 |
PurchaseName varchar(30) COMMENT '購入先', |
1576 |
PurchaseContactPersons varchar(30) COMMENT '購入先担当者', |
1577 |
PurchasePhone varchar(13) COMMENT '購入先電話番号', |
1578 |
LeaseDate date COMMENT 'リース開始日', |
1579 |
LeaseDestination varchar(30) COMMENT 'リース先', |
1580 |
LeaseContactPersons varchar(30) COMMENT 'リース先担当者', |
1581 |
LeasePhone varchar(13) COMMENT 'リース先電話番号', |
1582 |
InsuranceCompany varchar(30) COMMENT '任意保険会社', |
1583 |
InsuranceContactPersons varchar(30) COMMENT '任意保険会社担当者', |
1584 |
InsurancePhone varchar(13) COMMENT '任意保険会社電話番号', |
1585 |
Note varchar(300) COMMENT '備考', |
1586 |
EntryDate datetime COMMENT '登録日付', |
1587 |
UpdateDate datetime COMMENT '更新日付', |
1588 |
PRIMARY KEY (VehicleCode) |
1589 |
) COMMENT = '車両マスタ'; |
1590 |
|
1591 |
|
1592 |
-- 車両記録データ
|
1593 |
CREATE TABLE VehicleRecordData |
1594 |
( |
1595 |
VehicleCode smallint NOT NULL COMMENT '車両コード', |
1596 |
DivisionCode year(2) NOT NULL COMMENT 'データ区分', |
1597 |
SeqNo tinyint NOT NULL COMMENT '枝番', |
1598 |
RecordDate date COMMENT '実地日', |
1599 |
Mileage mediumint COMMENT '走行距離', |
1600 |
Content varchar(100) COMMENT '内容', |
1601 |
PaymentCost decimal(10,2) COMMENT '費用', |
1602 |
EntryDate datetime NOT NULL COMMENT '登録日付', |
1603 |
UpdateDate datetime NOT NULL COMMENT '更新日付', |
1604 |
PRIMARY KEY (VehicleCode, DivisionCode, SeqNo) |
1605 |
) COMMENT = '車両記録データ'; |
1606 |
|
1607 |
|
1608 |
-- 車両予約データ
|
1609 |
CREATE TABLE VehicleScheduleData |
1610 |
( |
1611 |
TargetDate date NOT NULL COMMENT '対象日', |
1612 |
VehicleCode smallint NOT NULL COMMENT '車両コード', |
1613 |
MorningAfternoon decimal(1) NOT NULL COMMENT '午前・午後', |
1614 |
PersonCode decimal(8,0) NOT NULL COMMENT '担当者コード', |
1615 |
TargetYear year(4) NOT NULL COMMENT '該当年', |
1616 |
TargetMonth year(2) NOT NULL COMMENT '該当月', |
1617 |
TargetDay year(2) NOT NULL COMMENT '該当日', |
1618 |
EntryDate datetime NOT NULL COMMENT '登録年月日', |
1619 |
UpdateDate datetime NOT NULL COMMENT '更新年月日', |
1620 |
PRIMARY KEY (TargetDate, VehicleCode, MorningAfternoon) |
1621 |
) COMMENT = '車両予約データ'; |
1622 |
|
1623 |
|
1624 |
|
1625 |
/* Create Indexes */
|
1626 |
|
1627 |
CREATE INDEX ActionScheduleData_Index1 ON ActionScheduleData (TargetYear ASC); |
1628 |
CREATE INDEX ActionScheduleData_Index2 ON ActionScheduleData (TargetMonth ASC); |
1629 |
CREATE INDEX ActionScheduleData_Index3 ON ActionScheduleData (TargetDay ASC); |
1630 |
CREATE INDEX BusinessTypeMaster_Index1 ON BusinessTypeMaster (DisplayOrder ASC); |
1631 |
CREATE INDEX ComponentLinkMaster_Index1 ON ComponentLinkMaster (ComponentCode ASC); |
1632 |
CREATE INDEX ComponentLinkMaster_Index2 ON ComponentLinkMaster (ItemCode ASC); |
1633 |
CREATE INDEX ComponentMaster_Index1 ON ComponentMaster (DisplayOrder ASC); |
1634 |
CREATE INDEX ComponentToTypeMaster_Index1 ON ComponentToTypeMaster (ComponentCode ASC); |
1635 |
CREATE INDEX ComponentToTypeMaster_Index2 ON ComponentToTypeMaster (TypeCode ASC); |
1636 |
CREATE INDEX BaseInfo_Index1 ON ConstructionBaseInfo (ConstructionStatusFlg ASC); |
1637 |
CREATE INDEX BaseInfo_Index2 ON ConstructionBaseInfo (EstimateType ASC); |
1638 |
CREATE INDEX BaseInfo_Index3 ON ConstructionBaseInfo (SalesPersonCode ASC); |
1639 |
CREATE INDEX BaseInfo_Index4 ON ConstructionBaseInfo (ConstructionPersonCode ASC); |
1640 |
CREATE INDEX BaseInfo_Index5 ON ConstructionBaseInfo (ConstructionInstructor ASC); |
1641 |
CREATE INDEX BaseInfoDetail_Idx1 ON ConstructionBaseInfoDetail (ConstructionCode ASC); |
1642 |
CREATE INDEX BaseInfoDetail_Idx2 ON ConstructionBaseInfoDetail (DetailNo ASC); |
1643 |
CREATE INDEX LedgerDetail_Index01 ON ConstructionLedgerDetail (ConstructionCode ASC); |
1644 |
CREATE INDEX LedgerDetail_Index02 ON ConstructionLedgerDetail (GroupCount ASC); |
1645 |
CREATE INDEX LedgerDetail_Index03 ON ConstructionLedgerDetail (SourceCode ASC); |
1646 |
CREATE INDEX LedgerExcute_Index1 ON ConstructionLedgerExcute (ConstructionCode ASC, TargetMonth ASC, GroupCount ASC, LineCount ASC); |
1647 |
CREATE INDEX ConstructionLink_Index1 ON ConstructionLink (ConstructionCode ASC); |
1648 |
CREATE INDEX ConstructionLink_Index2 ON ConstructionLink (FluctuationCode ASC); |
1649 |
CREATE INDEX ConstructionLink_Index3 ON ConstructionLink (LinkType ASC); |
1650 |
CREATE INDEX ConstructionSpecMaster_Index1 ON ConstructionSpecMaster (DisplayOrder ASC); |
1651 |
CREATE INDEX CostDataOfPerson_Index1 ON CostDataOfPerson (TargetMonth ASC); |
1652 |
CREATE INDEX CostDataOfPerson_Index2 ON CostDataOfPerson (ConstructionCode ASC); |
1653 |
CREATE INDEX DailyDataConstruction_Index1 ON DailyDataConstruction (PersonCode ASC); |
1654 |
CREATE INDEX DailyDataConstruction_Index2 ON DailyDataConstruction (DailyDataDate ASC); |
1655 |
CREATE INDEX DailyDataConstruction_Index3 ON DailyDataConstruction (ConstructionCode ASC); |
1656 |
CREATE INDEX DailyDataDetail_Index ON DailyDataDetail (PersonCode ASC, DailyDataDate ASC, ConstructionCode ASC); |
1657 |
CREATE INDEX DailyDataField_Index ON DailyDataField (PersonCode ASC, DailyDataDate ASC, ConstructionCode ASC); |
1658 |
CREATE INDEX DailyDataMaterials_Index ON DailyDataMaterials (PersonCode ASC, DailyDataDate ASC, ConstructionCode ASC); |
1659 |
CREATE INDEX DailyDataSubcontractors_Index ON DailyDataSubcontractors (PersonCode ASC, DailyDataDate ASC, ConstructionCode ASC); |
1660 |
CREATE INDEX DailyDataVehicles_Index ON DailyDataVehicles (PersonCode ASC, DailyDataDate ASC, ConstructionCode ASC); |
1661 |
CREATE INDEX DepartmentMaster_index1 ON DepartmentMaster (DisplayOrder ASC); |
1662 |
CREATE INDEX EstimateData_Index1 ON EstimateData (ConstructionCode ASC, FixedItemCode ASC); |
1663 |
CREATE INDEX EstimateDataBody_Index1 ON EstimateDataBody (ConstructionCode ASC, ComponentCode ASC, ItemCode ASC); |
1664 |
CREATE INDEX EstimateDataDetail_Index1 ON EstimateDataDetail (ConstructionCode ASC, PageCount ASC); |
1665 |
CREATE INDEX HolidayCalender_Index1 ON HolidayCalenderMaster (BusinessYear ASC); |
1666 |
CREATE INDEX HolidayCalenderMaster_Index2 ON HolidayCalenderMaster (TargetMonth ASC); |
1667 |
CREATE INDEX HolidayCalenderMaster_Index3 ON HolidayCalenderMaster (TargetDay ASC); |
1668 |
CREATE INDEX InputSearchLogData_Index1 ON InputSearchLogData (ConstructionCode ASC, UsedProcessNo ASC, InputCode ASC); |
1669 |
CREATE INDEX MessageBoardData_Index1 ON MessageBoardData (WritingDate ASC); |
1670 |
CREATE INDEX MessageBoardData_Index2 ON MessageBoardData (MessageFlag ASC); |
1671 |
CREATE INDEX MessageBoardTerget_Index1 ON MessageBoardTerget (RecordNumber ASC, BranchNumber ASC); |
1672 |
CREATE INDEX PersonDepartmentMaster_Index1 ON PersonDepartmentMaster (PersonCode ASC); |
1673 |
CREATE INDEX PersonDepartmentMaster_Index2 ON PersonDepartmentMaster (DepartmentCode ASC); |
1674 |
CREATE INDEX PersonInChargeMaster_Index1 ON PersonInChargeMaster (StartDate ASC); |
1675 |
CREATE INDEX PersonInChargeMaster_Index2 ON PersonInChargeMaster (DepartmentCode ASC); |
1676 |
CREATE INDEX PersonSalaryMaster_Index1 ON PersonSalaryMaster (PersonCode ASC); |
1677 |
CREATE INDEX PersonSalaryMaster_Index2 ON PersonSalaryMaster (StartDate ASC); |
1678 |
CREATE INDEX ProcessExcuteMaster_Index1 ON ProcessExcuteMaster (SecCode ASC); |
1679 |
CREATE INDEX ProcessExcuteMaster_Index2 ON ProcessExcuteMaster (ExecCode ASC); |
1680 |
CREATE INDEX POrderDetail_Index1 ON PurchaseOrderDetail (SourceCode ASC); |
1681 |
CREATE INDEX SalesGraphData_Idx1 ON SalesGraphData (DisplayOrder ASC); |
1682 |
CREATE INDEX SalesGraphData_idx2 ON SalesGraphData (ConstructionPeriod ASC); |
1683 |
CREATE INDEX SecurityMaster_Index1 ON SecurityMaster (DisplayOrder ASC); |
1684 |
CREATE INDEX SecurityMaster_Index2 ON SecurityMaster (SecRank ASC); |
1685 |
CREATE INDEX SecurityMaster_Index3 ON SecurityMaster (SecRange ASC); |
1686 |
CREATE INDEX SubContractorJobItem_Index1 ON SubContractorJobItem (CompanyCode ASC); |
1687 |
CREATE INDEX SubContractorJobItem_Index2 ON SubContractorJobItem (ItemCode ASC); |
1688 |
CREATE INDEX SubContractorJobLink_Index1 ON SubContractorJobLink (CompanyCode ASC); |
1689 |
CREATE INDEX SubContractorJobLink_Index2 ON SubContractorJobLink (JobCategoryCode ASC); |
1690 |
CREATE INDEX SubContractorMaster_Index1 ON SubContractorMaster (JapaneseSyllabary ASC); |
1691 |
CREATE INDEX TermMaster_Index1 ON TermMaster (DisplayOrder ASC); |
1692 |
CREATE INDEX UnitMaster_Index1 ON UnitMaster (DisplayOrder ASC); |
1693 |
CREATE INDEX VehicleScheduleData_Index1 ON VehicleScheduleData (TargetYear ASC); |
1694 |
CREATE INDEX VehicleScheduleData_Index2 ON VehicleScheduleData (TargetMonth ASC); |
1695 |
CREATE INDEX VehicleScheduleData_Index3 ON VehicleScheduleData (TargetDay ASC); |
1696 |
|
1697 |
|
1698 |
|